/**
 * Dropship Module Styles
 * Extracted from inline styles in Modules/DropShip/resources/views/
 *
 * Sections:
 * 1. Orders - List, Create, Show, Import Modal
 * 2. Packages
 * 3. Accessories
 * 4. Inventory - Tabs, Status Badges
 * 5. Customer Detail
 * 6. Common Components
 */

/* ==========================================================================
   1. ORDERS
   ========================================================================== */

/* --- Order List (index) --- */

.ds-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.ds-filter-form .ds-filter-field {
    flex: 1;
}

.ds-filter-form .ds-filter-select {
    min-width: 180px;
}

.ds-filter-form .ds-filter-status {
    min-width: 160px;
}

.ds-order-link {
    color: #1a237e;
    font-weight: 600;
}

.ds-order-link:hover {
    color: #0d1259;
}

.ds-buyer-link {
    color: #1565c0;
    text-decoration: none;
}

.ds-buyer-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.ds-buyer-link .ds-external-icon {
    font-size: 10px;
    opacity: 0.5;
}

/* --- Order Show (detail) --- */

/* Action buttons */
.ds-btn-processing {
    background: linear-gradient(135deg, #1a237e, #3f51b5);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 13px;
}

.ds-btn-processing:hover {
    background: linear-gradient(135deg, #0d1259, #303f9f);
    color: #fff;
}

.ds-btn-complete {
    background: linear-gradient(135deg, #1b5e20, #43a047);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 13px;
}

.ds-btn-complete:hover {
    background: linear-gradient(135deg, #145218, #388e3c);
    color: #fff;
}

.ds-btn-cancel {
    background: #fff;
    color: #d32f2f;
    border: 2px solid #d32f2f;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 13px;
}

.ds-btn-cancel:hover {
    background: #d32f2f;
    color: #fff;
}

.ds-action-row {
    gap: 10px 0;
}

/* --- Status Timeline (order show) --- */

.ds-timeline {
    padding: 16px 20px;
}

.ds-timeline-item {
    gap: 12px;
}

.ds-timeline-icon-col {
    width: 36px;
    flex-shrink: 0;
}

.ds-timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-timeline-icon i {
    font-size: 14px;
}

.ds-timeline-line {
    width: 2px;
    flex: 1;
    min-height: 20px;
    background: #e0e0e0;
    margin: 4px 0;
}

.ds-timeline-content {
    flex: 1;
}

.ds-timeline-content--spacing {
    padding-bottom: 16px;
}

.ds-timeline-status {
    font-size: 13px;
}

.ds-timeline-note {
    font-size: 12px;
    color: #555;
    margin-top: 2px;
}

.ds-timeline-meta {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.ds-timeline-empty-icon {
    font-size: 24px;
    opacity: 0.3;
}

/* Timeline icon backgrounds by status */
.ds-timeline-icon--new       { background: #eceff1; }
.ds-timeline-icon--processing { background: #e3f2fd; }
.ds-timeline-icon--confirmed  { background: #e8f5e9; }
.ds-timeline-icon--producing  { background: #fff3e0; }
.ds-timeline-icon--canceled   { background: #fce4ec; }
.ds-timeline-icon--shipping   { background: #e1f5fe; }
.ds-timeline-icon--delivered   { background: #e8f5e9; }
.ds-timeline-icon--completed   { background: #e8f5e9; }

/* Timeline icon colors */
.ds-timeline-icon-color--new       { color: #78909c; }
.ds-timeline-icon-color--processing { color: #1565c0; }
.ds-timeline-icon-color--confirmed  { color: #2e7d32; }
.ds-timeline-icon-color--producing  { color: #e65100; }
.ds-timeline-icon-color--canceled   { color: #c62828; }
.ds-timeline-icon-color--shipping   { color: #0277bd; }
.ds-timeline-icon-color--delivered   { color: #2e7d32; }
.ds-timeline-icon-color--completed   { color: #1b5e20; }

/* --- Cancel Order Modal --- */

#cancelOrderModal .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

#cancelOrderModal .modal-header.ds-cancel-header {
    background: linear-gradient(135deg, #c62828, #e53935) !important;
    color: #fff !important;
    border-bottom: none !important;
    padding: 20px 24px !important;
}

#cancelOrderModal .modal-header.ds-cancel-header .modal-title {
    color: #fff;
}

#cancelOrderModal .modal-header.ds-cancel-header .close {
    color: #fff;
    opacity: 0.8;
    text-shadow: none;
    font-size: 24px;
}

#cancelOrderModal .modal-header.ds-cancel-header .close:hover {
    opacity: 1;
}

.ds-cancel-modal-body {
    padding: 24px;
}

.ds-cancel-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fce4ec;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ds-cancel-icon-circle i {
    font-size: 28px;
    color: #d32f2f;
}

.ds-cancel-modal-footer {
    border-top: 1px solid #eee;
    padding: 16px 24px;
}

.ds-modal-btn {
    border-radius: 8px;
    padding: 8px 20px;
}

.ds-modal-btn--confirm {
    font-weight: 600;
}

.ds-modal-input {
    border-radius: 8px;
}

/* --- Import Modal --- */

#importExcelModal .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

#importExcelModal .modal-header.ds-modal-header {
    background: linear-gradient(135deg, #1a237e, #3f51b5) !important;
    color: #fff !important;
    border-bottom: none !important;
    padding: 20px 24px !important;
}

#importExcelModal .modal-header.ds-modal-header .modal-title {
    color: #fff;
}

#importExcelModal .modal-header.ds-modal-header .close {
    color: #fff;
    opacity: 0.8;
    text-shadow: none;
}

#importExcelModal .modal-header.ds-modal-header .close:hover {
    opacity: 1;
}

#importExcelModal .modal-body {
    padding: 24px;
}

#importExcelModal .modal-footer {
    border-top: 1px solid #eee;
    padding: 16px 24px;
}

#importPreviewArea {
    max-height: 320px;
    overflow-y: auto;
}

#importPreviewArea table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.ds-import-file-info {
    background: #e8f5e9;
    gap: 10px;
}

.ds-import-file-info .ds-file-icon {
    font-size: 24px;
    color: #2e7d32;
}

.ds-import-instructions {
    background: #f5f5f5;
}

.ds-import-instructions ol {
    padding-left: 18px;
}

.ds-import-result-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 10px;
    padding: 16px;
}

.ds-import-result-success .ds-result-icon {
    font-size: 24px;
    color: #2e7d32;
}

.ds-import-result-success .ds-result-title {
    font-size: 16px;
    color: #2e7d32;
}

.ds-import-result-success .ds-result-stats {
    display: flex;
    gap: 20px;
}

.ds-import-result-error {
    border-radius: 10px;
    padding: 12px 16px;
    max-height: 200px;
    overflow-y: auto;
}

.ds-import-result-fail {
    border-radius: 10px;
    padding: 16px;
}

.ds-import-result-fail .ds-result-icon {
    font-size: 24px;
}

.ds-import-result-fail .ds-result-title {
    font-size: 16px;
}

/* --- Order Create --- */

.ds-mockup-preview {
    background: #f0f4ff;
    border: 1px solid #c5cae9;
}

.ds-mockup-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
}


/* ==========================================================================
   2. PACKAGES
   ========================================================================== */

/* Package type badges - already handled by Bootstrap .badge */

/* No unique inline styles beyond common patterns */


/* ==========================================================================
   3. ACCESSORIES
   ========================================================================== */

.ds-accessory-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.ds-accessory-thumb-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.ds-accessory-detail-thumb {
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
}

.ds-accessory-detail-thumb-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.ds-thumbnail-preview img {
    max-width: 150px;
    max-height: 150px;
}


/* ==========================================================================
   4. INVENTORY - Tabs, Status Badges
   ========================================================================== */

.ds-status-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
    padding: 0 16px;
}

.ds-status-tab {
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 0;
    outline: none;
    position: relative;
}

.ds-status-tab:hover {
    color: #1a237e;
    background: #f0f2ff;
}

.ds-status-tab.active {
    color: #1a237e;
    font-weight: 700;
    border-bottom: 3px solid #1a237e;
    background: #f0f2ff;
}

.ds-status-tab[data-status="in_stock"].active {
    color: #2e7d32;
    border-bottom-color: #2e7d32;
    background: #f0faf0;
}

.ds-status-tab[data-status="low_stock"].active {
    color: #e65100;
    border-bottom-color: #e65100;
    background: #fff8f0;
}

.ds-status-tab[data-status="out_of_stock"].active {
    color: #c62828;
    border-bottom-color: #c62828;
    background: #fff5f5;
}

.ds-status-tab .ds-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 7px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    background: #eee;
    color: #999;
    transition: all 0.2s;
}

.ds-status-tab.active .ds-tab-count {
    background: #1a237e;
    color: #fff;
    box-shadow: 0 2px 6px rgba(26, 35, 126, 0.3);
}

.ds-status-tab[data-status="in_stock"].active .ds-tab-count {
    background: #2e7d32;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.3);
}

.ds-status-tab[data-status="low_stock"].active .ds-tab-count {
    background: #e65100;
    box-shadow: 0 2px 6px rgba(230, 81, 0, 0.3);
}

.ds-status-tab[data-status="out_of_stock"].active .ds-tab-count {
    background: #c62828;
    box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
}

/* Inventory status icon colors */
.ds-icon-in-stock {
    color: #2e7d32;
}

.ds-icon-low-stock {
    color: #e65100;
}

.ds-icon-out-of-stock {
    color: #c62828;
}


/* ==========================================================================
   5. CUSTOMER DETAIL
   ========================================================================== */

.ds-customer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a237e, #3f51b5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.ds-customer-avatar span {
    font-size: 28px;
    color: #fff;
    font-weight: 700;
}

.ds-customer-info-item {
    gap: 10px;
}

.ds-customer-info-icon {
    width: 20px;
}

.ds-customer-info-icon--address {
    width: 20px;
    margin-top: 3px;
}

/* Stat Cards */
.ds-stat-card {
    gap: 14px;
}

.ds-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-stat-icon i {
    font-size: 20px;
}

.ds-stat-icon--orders {
    background: #e3f2fd;
}

.ds-stat-icon--orders i {
    color: #1565c0;
}

.ds-stat-icon--spent {
    background: #e8f5e9;
}

.ds-stat-icon--spent i {
    color: #2e7d32;
}

.ds-stat-icon--items {
    background: #fff3e0;
}

.ds-stat-icon--items i {
    color: #e65100;
}

.ds-stat-label {
    font-size: 12px;
}

.ds-stat-value {
    font-size: 22px;
    font-weight: 700;
}

.ds-stat-value--orders {
    color: #1a237e;
}

.ds-stat-value--spent {
    color: #2e7d32;
}

.ds-stat-value--items {
    color: #e65100;
}

/* Order summary bar */
.ds-summary-bar {
    gap: 20px;
}


/* ==========================================================================
   6. COMMON COMPONENTS
   ========================================================================== */

/* Status badge color map (used across multiple views) */
/* These map order status codes to Bootstrap badge variants:
   1 => secondary (New/Pending)
   2 => info (Processing)
   3 => primary (Confirmed)
   4 => warning (In Producing)
   7 => danger (Canceled)
   11 => info (In Transit/Shipping)
   12 => success (Delivered)
   13 => success (Completed)
*/

/* Gradient header used across modals */
.ds-gradient-header--primary {
    background: linear-gradient(135deg, #1a237e, #3f51b5) !important;
    color: #fff !important;
    border-bottom: none !important;
    padding: 20px 24px !important;
}

.ds-gradient-header--primary .modal-title {
    color: #fff;
}

.ds-gradient-header--primary .close,
.ds-gradient-header--primary .btn-close {
    color: #fff;
    opacity: 0.8;
    text-shadow: none;
}

.ds-gradient-header--primary .close:hover,
.ds-gradient-header--primary .btn-close:hover {
    opacity: 1;
}

.ds-gradient-header--danger {
    background: linear-gradient(135deg, #c62828, #e53935) !important;
    color: #fff !important;
    border-bottom: none !important;
    padding: 20px 24px !important;
}

.ds-gradient-header--danger .modal-title {
    color: #fff;
}

.ds-gradient-header--danger .close,
.ds-gradient-header--danger .btn-close {
    color: #fff;
    opacity: 0.8;
    text-shadow: none;
    font-size: 24px;
}

.ds-gradient-header--danger .close:hover,
.ds-gradient-header--danger .btn-close:hover {
    opacity: 1;
}

/* Rounded modal */
.ds-modal-rounded .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

/* AI Analysis box hover effects (from order show/dashboard) */
.ds-ai-box {
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ds-ai-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dashboard cards */
.ds-dashboard-metric {
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ds-dashboard-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Fade-in animation for lazy-loaded rows */
.ds-fade-in {
    animation: dsFadeIn 0.3s ease-in;
}

@keyframes dsFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Load more / end indicators */
.ds-load-more {
    text-align: center;
    padding: 20px 0;
}

.ds-end-message {
    text-align: center;
    padding: 16px 0;
    color: #888;
    font-size: 13px;
}

/* --- Status Icon Colors --- */
.ds-icon-in-stock { color: #2e7d32; }
.ds-icon-low-stock { color: #e65100; }
.ds-icon-out-of-stock { color: #c62828; }

/* --- Menu Badge --- */
.ds-menu-badge-new {
    background: linear-gradient(135deg, #e53935, #ff5722);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 4px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
