/* ==========================================
   ORDER DETAILS
========================================== */

.order-details-section {
    background: #f7faf7;
}

.order-details-card {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 24px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .07);
}

.order-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.small-label {
    color: #777;
    font-size: 14px;
}

.order-header-card h2 {
    margin: 6px 0;
    font-size: 24px;
    font-weight: 700;
    color: #222;
}

.order-header-card p {
    margin: 0;
    color: #777;
}

.order-status {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
}

.status-whatsapp-pending {
    background: #FFF8E1;
    color: #B78103;
    border: 1px solid #FFE082;
    font-weight: 700;
}

.whatsapp-details-reminder {
    background: #f0faf2;
    border: 2px solid #25D366;
    border-radius: 18px;
    padding: 20px 24px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.15);
}

.whatsapp-reminder-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.whatsapp-reminder-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 280px;
}

.reminder-wa-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

.status-shipped {
    background: #cff4fc;
    color: #055160;
}

.status-delivered {
    background: #d1e7dd;
    color: #0f5132;
}

.status-cancelled {
    background: #f8d7da;
    color: #842029;
}

.card-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-title h3 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: #222;
}


/* ==========================================
   ORDER PRODUCTS
========================================== */

.order-product {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}

.order-product:last-child {
    border-bottom: none;
}

.order-product-image {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    background: #f5f5f5;
    overflow: hidden;
    flex-shrink: 0;
}

.order-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.order-product-info {
    flex: 1;
}

.order-product-info h4 {
    margin: 0 0 7px;
    font-size: 17px;
    font-weight: 600;
}

.order-product-info p {
    margin: 0 0 5px;
    color: #777;
    font-size: 14px;
}

.order-product-info span {
    font-size: 14px;
    color: #555;
}

.order-product-total {
    font-size: 17px;
    color: #2E7D32;
}


/* ==========================================
   DELIVERY ADDRESS
========================================== */

.delivery-address h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.delivery-address p {
    margin-bottom: 7px;
    color: #666;
    line-height: 1.6;
}


/* ==========================================
   DELIVERY INFORMATION
========================================== */

.delivery-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.delivery-info-grid div {
    background: #f7faf7;
    padding: 15px;
    border-radius: 12px;
}

.delivery-info-grid span {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 5px;
}

.delivery-info-grid strong {
    color: #222;
    font-size: 14px;
}

.order-notes {
    margin-top: 20px;
    padding: 15px;
    background: #fffbea;
    border-radius: 12px;
}

.order-notes p {
    margin: 7px 0 0;
    color: #666;
}


/* ==========================================
   ORDER SUMMARY
========================================== */

.order-summary-card {
    position: sticky;
    top: 150px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    color: #555;
}

.summary-total {
    font-size: 19px;
    color: #222;
}

.summary-total strong {
    color: #2E7D32;
    font-size: 22px;
}

.free-text {
    color: #2E7D32;
    font-weight: 600;
}


/* ==========================================
   BUTTONS
========================================== */

.order-details-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.back-orders-btn,
.continue-shopping-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s ease;
}

.back-orders-btn {
    background: #2E7D32;
    color: #fff;
}

.back-orders-btn:hover {
    background: #1B5E20;
    color: #fff;
    transform: translateY(-2px);
}

.continue-shopping-btn {
    border: 1px solid #2E7D32;
    color: #2E7D32;
    background: #fff;
}

.continue-shopping-btn:hover {
    background: #2E7D32;
    color: #fff;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

    .order-header-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .order-product {
        align-items: flex-start;
    }

    .order-product-image {
        width: 70px;
        height: 70px;
    }

    .order-product-total {
        font-size: 15px;
    }

    .delivery-info-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 576px) {

    .order-details-card {
        padding: 18px 14px;
        border-radius: 15px;
    }

    .order-header-card h2 {
        font-size: 20px;
    }

    .back-orders-btn,
    .continue-shopping-btn,
    .cancel-order-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

}

/* ==========================================
   FLASH ALERTS
========================================== */

.order-flash-alert {
    border-radius: 14px;
    font-size: 15px;
    padding: 16px 20px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.order-flash-alert.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border-left: 5px solid #2e7d32;
}

.order-flash-alert.alert-danger {
    background: #ffebee;
    color: #b71c1c;
    border-left: 5px solid #d32f2f;
}

.order-flash-alert.alert-warning {
    background: #fff8e1;
    color: #f57f17;
    border-left: 5px solid #fbc02d;
}


/* ==========================================
   CANCELLATION POLICY & ACTIONS
========================================== */

.cancellation-action-box {
    background: #ffffff;
    border: 1px solid #e2ece2;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.06);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cancellation-window-info {
    background: linear-gradient(135deg, #f1f8f1 0%, #e8f5e9 100%);
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 14px 16px;
}

.window-info-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.window-title {
    font-size: 13px;
    font-weight: 700;
    color: #1b5e20;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2e7d32;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
    }
    50% {
        box-shadow: 0 2px 14px rgba(46, 125, 50, 0.45);
    }
}

.countdown-badge.expired {
    background: #757575;
    animation: none;
    box-shadow: none;
}

.window-deadline-text {
    margin: 0;
    font-size: 12.5px;
    color: #436445;
    line-height: 1.45;
}

.window-deadline-text strong {
    color: #1b5e20;
}

.cancel-order-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cancel-reason-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.cancel-reason-box select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dcdcdc;
    border-radius: 10px;
    font-size: 13.5px;
    color: #333;
    background-color: #fdfdfd;
    outline: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.cancel-reason-box select:focus {
    border-color: #2e7d32;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

.cancel-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 30px;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border: none;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
}

.cancel-order-btn:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.35);
}

.cancel-order-btn:active {
    transform: translateY(0);
}


/* ==========================================
   CANCELLATION EXPIRED NOTICE
========================================== */

.cancellation-expired-card {
    background: #fdfdfd;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #9ca3af;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 6px;
}

.expired-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 6px;
}

.expired-card-header i {
    color: #6b7280;
}

.expired-card-desc {
    margin: 0;
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.45;
}

.expired-card-desc strong {
    color: #374151;
}


/* ==========================================
   CANCELLATION REASON DISPLAY
========================================== */

.cancellation-reason {
    margin-top: 20px;
    padding: 18px 20px;
    background: #fff5f5;
    border-left: 4px solid #dc3545;
    border-radius: 12px;
}

.cancellation-reason strong {
    display: block;
    color: #b02a37;
    font-size: 15px;
    margin-bottom: 8px;
}

.cancellation-reason p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}