/* Order Confirmation Page Styles */

/* Base Layout */
body {
    background-color: #fafafa;
}

.order-confirm-section {
    padding-top: 24px;
    padding-bottom: 60px;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

.back-link i {
    margin-right: 8px;
    font-size: 18px;
}

/* Hero Banner */
.confirm-hero {
    background-color: #fff;
    border-radius: 16px;
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    background-image: url('../img/order-confirm/bg-l.png'), url('../img/order-confirm/bg-r.png');
    background-position: left center, right center;
    background-repeat: no-repeat, no-repeat;
    background-size: auto, auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.85);
    /* Frost effect to make text readable */
    padding: 24px;
    border-radius: 16px;
    display: inline-block;
    max-width: 600px;
}

.success-icon-wrapper {
    width: 96px;
    height: 96px;
    background-color: #dce7fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
}

.success-icon-inner {
    width: 56px;
    height: 56px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 15px;
    color: #475569;
    margin-bottom: 32px;
    line-height: 1.6;
}

.order-number-badge {
    display: inline-block;
    background-color: #16a34a;
    /* Green */
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.order-number-badge span {
    font-weight: 500;
    margin-right: 8px;
}

/* Common Card */
.confirm-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-title-sm {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
}

/* Horizontal Timeline (What happens next) */
.timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 16px;
    padding: 0;
}

.timeline-line {
    position: absolute;
    top: 32px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}

.timeline-line-active {
    position: absolute;
    top: 32px;
    left: 12.5%;
    width: 25%;
    /* From center of step 1 to center of step 2 */
    height: 2px;
    background-color: var(--primary-color);
    z-index: 2;
}

.timeline-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.timeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #94a3b8;
    margin-bottom: 0;
}

.timeline-step.completed .timeline-icon {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* All steps get a uniform outer wrapper to keep line alignment consistent */
.timeline-icon-outer {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background-color: transparent;
}

/* Outer light-blue ring for completed and active steps */
.timeline-step.completed .timeline-icon-outer,
.timeline-step.active .timeline-icon-outer {
    background-color: #dce7fa;
}

/* Inner solid blue circle with white icon — completed and active */
.timeline-step.completed .timeline-icon,
.timeline-step.active .timeline-icon {
    width: 44px;
    height: 44px;
    border: none;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 0;
}

.timeline-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.timeline-date {
    font-size: 12px;
    color: #64748b;
}

/* Details Grid */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.detail-value {
    color: #0f172a;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.badge-paid {
    background-color: #16a34a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* Shipping Address Data */
.address-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.address-text strong {
    color: #0f172a;
    display: block;
    margin-bottom: 4px;
}

/* Support Card */
.support-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
}

.support-text-block {
    max-width: 350px;
}

.support-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.support-desc {
    font-size: 14px;
    color: #475569;
    margin: 0;
}

.support-actions {
    display: flex;
    gap: 16px;
}

.btn-support-solid {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-support-solid:hover {
    background-color: var(--primary-hover);
}

.btn-support-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-support-outline:hover {
    background-color: #eff6ff;
}

/* Right Sidebar: Order Summary */
.summary-item {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.summary-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.summary-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.summary-item-info {
    flex: 1;
    margin-left: 16px;
}

.summary-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.summary-item-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.summary-item-qty {
    display: inline-block;
    background-color: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.summary-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 24px 0;
}

.summary-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: #475569;
}

.summary-totals-row:last-child {
    margin-bottom: 0;
}

.summary-totals-row.total {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 24px;
}

/* Estimated Delivery Card */
.delivery-card {
    display: flex;
    align-items: flex-start;
}

.delivery-icon {
    width: 24px;
    height: 24px;
    color: #0f172a;
    font-size: 24px;
    margin-right: 16px;
    margin-top: 2px;
}

.delivery-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.delivery-date {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.delivery-text {
    font-size: 13px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

/* Track App Card */
.track-app-card {
    background-color: var(--primary-color);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
}

.track-app-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.track-app-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-app {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.btn-app:last-child {
    margin-bottom: 0;
}

.btn-app i {
    font-size: 18px;
    margin-right: 8px;
}

.btn-app.white {
    background-color: #fff;
    color: var(--primary-color);
}

.btn-app.white:hover {
    background-color: #f8fafc;
}

.btn-app.outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-app.outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Trust Badges Row */
.trust-badges-container {
    padding-top: 40px;
    padding-bottom: 20px;
    border-top: 1px solid #e2e8f0;
}

.trust-badge-col {
    display: flex;
    align-items: flex-start;
}

.trust-badge-icon-box {
    width: 48px;
    height: 48px;
    background-color: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #0f172a;
    margin-right: 16px;
    flex-shrink: 0;
}

.trust-badge-info h6 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.trust-badge-info p {
    font-size: 13px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* --- Tablet: max 991px --- */
@media (max-width: 991px) {

    /* Stack the support card vertically */
    .support-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .support-actions {
        width: 100%;
        flex-direction: row;
    }

    .btn-support-solid,
    .btn-support-outline {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    /* Hero title can be slightly smaller on tablet */
    .hero-title {
        font-size: 24px;
    }
}

/* --- Mobile: max 768px --- */
@media (max-width: 768px) {

    /* Hero Banner */
    .confirm-hero {
        padding: 40px 16px;
        border-radius: 12px;
        /* Keep bg images but adjust so they don't cover content */
        background-size: 45%, 45%;
    }

    .hero-content {
        padding: 16px;
    }

    .success-icon-wrapper {
        width: 72px;
        height: 72px;
    }

    .success-icon-inner {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .hero-title {
        font-size: 20px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .order-number-badge {
        font-size: 12px;
        padding: 10px 18px;
    }

    /* Timeline: stack vertically on mobile */
    .timeline-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 0;
    }

    .timeline-line,
    .timeline-line-active {
        display: none;
    }

    .timeline-step {
        flex-direction: row;
        width: 100%;
        text-align: left;
        align-items: center;
        gap: 16px;
    }

    .timeline-icon-outer {
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    .timeline-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .timeline-label {
        margin-bottom: 2px;
    }

    /* Cards */
    .confirm-card {
        padding: 20px;
    }

    .card-title-sm {
        font-size: 16px;
    }

    /* Support card */
    .support-card {
        padding: 20px;
    }

    .support-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-support-solid,
    .btn-support-outline {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Trust badges: stack on small screens */
    .trust-badge-col {
        margin-bottom: 20px;
    }

    /* Track App card */
    .track-app-card {
        padding: 24px;
        margin-bottom: 24px;
    }

    .track-app-title {
        font-size: 18px;
    }

    /* Order details */
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Totals row */
    .summary-totals-row.total {
        font-size: 18px;
    }

    /* Delivery card */
    .delivery-date {
        font-size: 18px;
    }
}

/* --- Small Mobile: max 480px --- */
@media (max-width: 480px) {

    .hero-title {
        font-size: 18px;
    }

    .order-number-badge {
        display: block;
        text-align: center;
        border-radius: 12px;
    }

    .back-link {
        font-size: 14px;
    }

    .confirm-hero {
        background-image: none;
        /* Hide bg images on very small screens to avoid clutter */
    }
}