/**
 * Reliquats — styles prioritaires (chargés après le thème)
 * Préfixe div.msc-order-tracking pour battre la spécificité des thèmes.
 */

div.msc-order-tracking div.msc-reliquat-section {
    margin: 28px 0 12px !important;
    padding: 22px !important;
    background: #ffffff !important;
    border: 1px solid #c7d2e0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08) !important;
}

div.msc-order-tracking h4.msc-reliquat-section-title {
    margin: 0 0 0 !important;
    padding: 0 0 14px !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    border-bottom: 2px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

div.msc-order-tracking span.msc-reliquat-section-icon {
    font-size: 1.35rem !important;
    line-height: 1 !important;
}

div.msc-order-tracking p.msc-reliquat-section-intro {
    margin: 14px auto 22px !important;
    padding: 0 12px !important;
    max-width: 40em !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    color: #475569 !important;
    text-align: center !important;
}

/* Carte reliquat */
div.msc-order-tracking div.msc-reliquat-card {
    position: relative !important;
    background: #ffffff !important;
    border: 2px solid #0ea5e9 !important;
    border-radius: 16px !important;
    padding: 20px 22px !important;
    margin-bottom: 18px !important;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.12) !important;
    overflow: hidden !important;
}

div.msc-order-tracking div.msc-reliquat-card::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 5px !important;
    background: #0ea5e9 !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-pending {
    border-color: #f59e0b !important;
    background: linear-gradient(135deg, #fffdfb 0%, #fff7ed 100%) !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.15) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-pending::before {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-preparing {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #fafcff 0%, #eff6ff 100%) !important;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.14) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-preparing::before {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-shipped {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, #fafffe 0%, #ecfdf5 100%) !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.14) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-shipped::before {
    background: linear-gradient(180deg, #34d399 0%, #059669 100%) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-closed {
    border-color: #94a3b8 !important;
    background: linear-gradient(135deg, #fcfcfd 0%, #f1f5f9 100%) !important;
    box-shadow: 0 2px 12px rgba(100, 116, 139, 0.1) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-closed::before {
    background: #94a3b8 !important;
}

div.msc-order-tracking div.msc-reliquat-card-head {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 10px !important;
    padding-left: 8px !important;
}

div.msc-order-tracking span.msc-reliquat-meta-label {
    display: block !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #64748b !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
}

div.msc-order-tracking strong.msc-reliquat-ref {
    display: inline-block !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    font-family: ui-monospace, "Cascadia Code", "Courier New", monospace !important;
    letter-spacing: 0.04em !important;
    padding: 6px 12px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 10px !important;
}

/* Badge statut */
div.msc-order-tracking span.msc-reliquat-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #ffffff !important;
    background: #0ea5e9 !important;
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

div.msc-order-tracking span.msc-reliquat-badge-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45) !important;
    flex-shrink: 0 !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-pending span.msc-reliquat-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-preparing span.msc-reliquat-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-shipped span.msc-reliquat-badge {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.35) !important;
}

div.msc-order-tracking div.msc-reliquat-card.msc-reliquat-status-closed span.msc-reliquat-badge {
    background: linear-gradient(135deg, #94a3b8 0%, #475569 100%) !important;
    box-shadow: 0 2px 8px rgba(71, 85, 105, 0.25) !important;
}

div.msc-order-tracking div.msc-reliquat-date {
    font-size: 0.88rem !important;
    color: #64748b !important;
    margin-bottom: 10px !important;
    padding-left: 8px !important;
}

div.msc-order-tracking p.msc-reliquat-note {
    font-size: 0.92rem !important;
    color: #334155 !important;
    margin: 0 0 14px !important;
    padding: 12px 14px !important;
    line-height: 1.55 !important;
    background: rgba(255, 255, 255, 0.65) !important;
    border-radius: 10px !important;
    border-left: 4px solid #94a3b8 !important;
}

div.msc-order-tracking div.msc-reliquat-products-title {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    color: #475569 !important;
    margin: 16px 0 10px !important;
    padding-left: 8px !important;
}

div.msc-order-tracking ul.msc-reliquat-lines {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

div.msc-order-tracking li.msc-reliquat-line {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin: 0 !important;
}

div.msc-order-tracking li.msc-reliquat-line:last-child {
    border-bottom: none !important;
}

div.msc-order-tracking div.msc-reliquat-line-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

div.msc-order-tracking span.msc-reliquat-line-name {
    font-weight: 700 !important;
    color: #0f172a !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
}

div.msc-order-tracking span.msc-reliquat-line-ref {
    font-size: 0.8rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

div.msc-order-tracking div.msc-reliquat-line-side {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 92px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
    flex-shrink: 0 !important;
}

div.msc-order-tracking span.msc-reliquat-line-qty-label {
    font-size: 0.65rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #64748b !important;
    font-weight: 800 !important;
}

div.msc-order-tracking span.msc-reliquat-line-qty-value {
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    line-height: 1 !important;
}

@media (max-width: 768px) {
    div.msc-order-tracking div.msc-reliquat-section {
        padding: 16px !important;
    }

    div.msc-order-tracking div.msc-reliquat-card {
        padding: 16px !important;
    }

    div.msc-order-tracking li.msc-reliquat-line {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    div.msc-order-tracking div.msc-reliquat-line-side {
        align-items: flex-start !important;
        min-width: 0 !important;
        flex-direction: row !important;
        justify-content: space-between !important;
    }
}
