/**
 * Order Confirmation Page Styles - Shopify-style design
 * Two-column layout matching checkout page
 */

/* ==========================================
   FULL-PAGE SPLIT LAYOUT
   ========================================== */

.confirmation-page-body {
    background: #fff;
}

.confirmation-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.confirmation-split-layout {
    display: flex;
    min-height: 100vh;
}

/* Left side - white background */
.confirmation-left {
    flex: 1 1 55%;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    padding: 40px 40px 60px 40px;
}

.confirmation-content-wrapper {
    width: 100%;
    max-width: 540px;
    margin-right: 30px;
}

/* Right side - gray background */
.confirmation-right {
    flex: 0 0 45%;
    max-width: 45%;
    background: #fafafa;
    border-left: 1px solid #e1e1e1;
    padding: 40px 60px 60px 45px;
}

.order-summary-wrapper {
    position: sticky;
    top: 40px;
    max-width: 400px;
}

/* ==========================================
   HEADER
   ========================================== */

.confirmation-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.store-name {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 22px;
    color: #333;
    text-decoration: none;
}

.store-name:hover {
    color: #1990c6;
}

/* ==========================================
   CONFIRMATION SECTION
   ========================================== */

.confirmation-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.confirmation-icon {
    flex-shrink: 0;
}

.confirmation-icon svg {
    display: block;
}

.confirmation-text {
    flex: 1;
    padding-top: 4px;
}

.confirmation-label {
    font-size: 13px;
    color: #717171;
    margin: 0 0 4px 0;
}

.confirmation-title {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

/* ==========================================
   INFO CARDS
   ========================================== */

.info-card {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: #fff;
}

.card-title {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.card-text {
    font-size: 14px;
    color: #717171;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

/* Newsletter checkbox */
.newsletter-checkbox {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #1990c6;
    flex-shrink: 0;
}

.checkbox-text {
    line-height: 1.4;
    padding-top: 1px;
}

/* ==========================================
   ORDER DETAILS CARD
   ========================================== */

.order-details-card {
    padding: 20px;
}

.order-details-card .card-title {
    margin-bottom: 16px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

.detail-group {
    min-width: 0;
}

.detail-group.full-width {
    grid-column: 1 / -1;
    padding-top: 4px;
    margin-top: 4px;
    border-top: 1px solid #e8e8e8;
}

.detail-label {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
}

.detail-value {
    font-size: 14px;
    color: #545454;
    line-height: 1.5;
    margin: 0;
    font-style: normal;
}

/* Payment method display */
.payment-method-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #545454;
    flex-wrap: wrap;
}

.cod-icon {
    display: flex;
    align-items: center;
    color: #717171;
    flex-shrink: 0;
}

.payment-total {
    margin-left: auto;
    font-family: 'Inter', Arial, sans-serif;
    color: #545454;
}

/* ==========================================
   ACTIONS SECTION
   ========================================== */

.confirmation-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0;
    gap: 20px;
}

.help-link {
    font-size: 14px;
    color: #717171;
    margin: 0;
    white-space: nowrap;
}

.help-link a {
    color: #1990c6;
    text-decoration: underline;
}

.help-link a:hover {
    color: #1580b3;
}

.btn-continue {
    display: inline-block;
    padding: 14px 28px;
    background: #1990c6;
    color: #fff;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-continue:hover {
    background: #1580b3;
    color: #fff;
}

/* ==========================================
   FOOTER LINKS
   ========================================== */

.confirmation-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.confirmation-footer a {
    font-size: 12px;
    color: #1990c6;
    text-decoration: underline;
}

.confirmation-footer a:hover {
    color: #1580b3;
}

/* ==========================================
   ORDER ITEMS (Right Column)
   ========================================== */

.order-items {
    margin-bottom: 20px;
    margin-top: 15px;
}

.order-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    align-items: flex-start;
}

.order-item:first-child {
    padding-top: 0;
}

.order-item-image {
    width: 64px;
    height: 64px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

.order-item-qty {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    font-family: 'Inter', Arial, sans-serif;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.order-item-details {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.order-item-title {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
}

.order-item-variant {
    font-size: 12px;
    color: #717171;
}

.order-item-price {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    text-align: right;
    padding-top: 4px;
}

/* ==========================================
   SUMMARY TOTALS
   ========================================== */

.summary-totals {
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #545454;
}

.summary-row.total {
    padding-top: 16px;
    margin-top: 10px;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    align-items: baseline;
}

.summary-row.total > span:first-child {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 600;
    color: #333;
}

#summary-total {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.currency-code {
    font-size: 12px;
    color: #717171;
    font-family: 'Inter', Arial, sans-serif;
}

.total-amount {
    font-size: 22px;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 400;
    color: #333;
}

/* ==========================================
   MOBILE ORDER SUMMARY - COLLAPSIBLE
   ========================================== */

.mobile-order-summary-toggle,
.mobile-order-summary {
    display: none;
}

.mobile-order-summary-toggle {
    background: #fafafa;
    border-bottom: 1px solid #e1e1e1;
    padding: 16px 20px;
    justify-content: space-between;
    align-items: center;
}

.summary-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    color: #1990c6;
    cursor: pointer;
    padding: 0;
}

.toggle-cart-icon {
    color: #1990c6;
}

.toggle-chevron {
    color: #1990c6;
    transition: transform 0.3s ease;
}

.mobile-order-summary-toggle.expanded .toggle-chevron {
    transform: rotate(180deg);
}

.toggle-total {
    font-size: 16px;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 600;
    color: #333;
}

.mobile-order-summary {
    background: #fafafa;
    border-bottom: 1px solid #e1e1e1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-order-summary.expanded {
    max-height: 1000px;
}

.mobile-summary-content {
    padding: 0 20px 20px;
}

.mobile-totals {
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media (max-width: 1100px) {
    .confirmation-left {
        padding: 40px 30px 60px 30px;
    }

    .confirmation-content-wrapper {
        margin-right: 20px;
    }

    .confirmation-right {
        padding: 40px 30px 60px 30px;
    }
}

@media (max-width: 960px) {
    /* Hide desktop order summary */
    .confirmation-right {
        display: none;
    }

    /* Show mobile order summary elements */
    .mobile-order-summary-toggle {
        display: flex;
    }

    .mobile-order-summary {
        display: block;
    }

    .confirmation-split-layout {
        flex-direction: column;
        min-height: auto;
    }

    .confirmation-left {
        flex: none;
        justify-content: center;
        padding: 24px 20px 40px;
    }

    .confirmation-content-wrapper {
        max-width: 100%;
        margin-right: 0;
    }

    .order-summary-wrapper {
        position: static;
        max-width: none;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .detail-group.full-width {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }

    .confirmation-actions {
        flex-direction: column;
        text-align: center;
    }

    .btn-continue {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .confirmation-left {
        padding: 20px 16px 40px;
    }

    .mobile-order-summary-toggle {
        padding: 14px 16px;
    }

    .mobile-summary-content {
        padding: 0 16px 16px;
    }

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

    .store-name {
        font-size: 20px;
    }

    .order-item-image {
        width: 56px;
        height: 56px;
    }

    .confirmation-footer {
        gap: 14px;
        justify-content: center;
    }

    .total-amount {
        font-size: 20px;
    }

    .info-card {
        padding: 16px;
    }

    .order-details-card {
        padding: 16px;
    }

    .confirmation-section {
        gap: 12px;
    }

    .confirmation-icon svg {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 400px) {
    .confirmation-footer {
        gap: 12px;
    }

    .confirmation-footer a {
        font-size: 11px;
    }

    .payment-method-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .payment-total {
        margin-left: 0;
    }
}
