/**
 * Thank You Page (Order Received) Styles - Enhanced Design
 */

/* ===========================================
   Page Container
   =========================================== */

.thankyou-page {
    background: #f8f9fa;
    min-height: 70vh;
    padding: 60px 0;
}

.thankyou-page__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================================
   Header Section
   =========================================== */

.thankyou-header {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.thankyou-icon {
    margin-bottom: 24px;
    display: inline-flex;
    animation: scaleIn 0.5s ease-out;
}

.thankyou-icon--success svg circle {
    stroke: #28a745;
}

.thankyou-icon--success svg path {
    stroke: #28a745;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkmark 0.6s ease-out 0.3s forwards;
}

.thankyou-icon--failed svg circle {
    stroke: #dc3545;
}

.thankyou-icon--failed svg path {
    stroke: #dc3545;
}

.thankyou-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

.thankyou-message {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes checkmark {
    to {
        stroke-dashoffset: 0;
    }
}

/* ===========================================
   Order Info + QR Code Section
   =========================================== */

.thankyou-order-info-section {
    margin-bottom: 40px;
}

.thankyou-order-info-wrapper {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.thankyou-order-info-wrapper.has-qr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--tl-primary,#dc4d28);
}

/* Order Info */
.order-info-grid {
    display: grid;
    gap: 20px;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-info-item .label {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

.order-info-item .value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.order-info-item .value--highlight {
    color: var(--tl-primary,#dc4d28);
    font-size: 20px;
}

/* QR Code Section */
.thankyou-qr-section {
    background: linear-gradient(135deg, var(--tl-primary-soft,#fff5f2) 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 30px;
    border: 2px dashed var(--tl-primary,#dc4d28);
    text-align: center;
}

.qr-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.qr-code-wrapper {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent);
    display: inline-block;
}

.qr-code-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
}

/* Bank Info */
.bank-info {
    text-align: left;
    background: white;
    padding: 24px;
    border-radius: 8px;
    margin-top: 24px;
}

.bank-info-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
}

.bank-info-details {
    display: grid;
    gap: 12px;
}

.bank-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bank-info-item:last-child {
    border-bottom: none;
}

.bank-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.bank-value {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.bank-value--copy {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    user-select: all;
}

.bank-value--amount {
    color: var(--tl-primary,#dc4d28);
    font-size: 17px;
}

/* ===========================================
   Order Details Section
   =========================================== */

.thankyou-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.order-details-table {
    overflow-x: auto;
}

.order-details-table table {
    width: 100%;
    border-collapse: collapse;
}

.order-details-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--tl-primary,#dc4d28);
}

.order-details-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.order-details-table tbody tr:hover {
    background: #f8f9fa;
}

.order-details-table tbody td {
    padding: 20px 12px;
    vertical-align: middle;
}

/* Product Name Cell */
.product-name-wrapper {
    display: flex;
    gap: 16px;
    align-items: center;
}

.product-thumbnail {
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e9ecef;
}

.product-info {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

/* Product Cells */
.product-quantity {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.product-vat {
    text-align: center;
}

.vat-badge {
    display: inline-block;
    background: var(--tl-primary-soft,#fff5f2);
    color: var(--tl-primary,#dc4d28);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--tl-primary-light,#fde9e3);
}

.vat-none {
    color: #cbd5e0;
    font-size: 18px;
}

.product-total {
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* Table Footer */
.order-details-table tfoot tr {
    border-top: 1px solid #e9ecef;
}

.order-details-table tfoot th {
    padding: 12px;
    text-align: right;
    font-size: 15px;
    color: #495057;
    font-weight: 600;
}

.order-details-table tfoot td {
    padding: 12px;
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.order-details-table .order-vat td {
    color: var(--tl-primary,#dc4d28);
}

.order-details-table .order-total th {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    padding-top: 20px;
}

.order-details-table .order-total td {
    font-size: 20px;
    font-weight: 700;
    color: var(--tl-primary,#dc4d28);
    padding-top: 20px;
}

/* ===========================================
   Shipping Address Section
   =========================================== */

.shipping-address-wrapper {
    padding: 0;
}

.shipping-address-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.shipping-address-card:hover {
    border-color: var(--tl-primary,#dc4d28);
    box-shadow: 0 4px 12px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent);
}

.address-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--tl-primary,#dc4d28) 0%, var(--tl-primary-dark,#b83d1f) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.address-icon svg {
    stroke: white;
}

.address-content {
    flex: 1;
    font-size: 15px;
    line-height: 1.9;
    color: #495057;
}

.address-content strong {
    color: #2c3e50;
    font-size: 17px;
    display: block;
    margin-bottom: 8px;
}

.address-phone,
.address-email {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
}

.address-phone svg,
.address-email svg {
    flex-shrink: 0;
    stroke: var(--tl-primary,#dc4d28);
}

.address-phone span,
.address-email span {
    color: #2c3e50;
    font-weight: 500;
}

/* ===========================================
   Action Buttons
   =========================================== */

.thankyou-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.thankyou-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.thankyou-button svg {
    flex-shrink: 0;
}

.thankyou-button--secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e0e0e0;
}

.thankyou-button--secondary:hover {
    background: #f8f9fa;
    border-color: var(--tl-primary,#dc4d28);
    color: var(--tl-primary,#dc4d28);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thankyou-button--primary {
    background: var(--tl-primary,#dc4d28);
    color: white;
    box-shadow: 0 4px 12px color-mix(in srgb,var(--tl-primary,#dc4d28) 30%,transparent);
}

.thankyou-button--primary:hover {
    background: var(--tl-primary-dark,#b83d1f);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb,var(--tl-primary,#dc4d28) 40%,transparent);
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 992px) {
    .thankyou-order-info-wrapper.has-qr {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .thankyou-page {
        padding: 40px 0;
    }

    .thankyou-header {
        padding: 40px 20px;
    }

    .thankyou-title {
        font-size: 26px;
    }

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

    .thankyou-order-info-wrapper,
    .thankyou-section {
        padding: 24px;
    }

    /* Make table responsive */
    .order-details-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .order-details-table table {
        min-width: 600px;
    }

    /* Stack action buttons */
    .thankyou-actions {
        flex-direction: column;
        width: 100%;
        padding: 30px 20px;
    }

    .thankyou-button {
        width: 100%;
        justify-content: center;
    }

    /* Responsive product cells */
    .product-name-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-thumbnail {
        width: 100% !important;
        max-width: 120px !important;
        height: auto !important;
    }

    /* QR Code */
    .thankyou-qr-section {
        padding: 20px;
    }

    .qr-code-image {
        max-width: 240px;
    }

    .bank-info {
        padding: 16px;
    }

    .bank-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .bank-value--copy {
        width: 100%;
        text-align: center;
    }

    /* Address Card */
    .shipping-address-card {
        flex-direction: column;
        padding: 20px;
    }

    .address-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .thankyou-page__container {
        padding: 0 12px;
    }

    .thankyou-header {
        padding: 30px 16px;
    }

    .thankyou-title {
        font-size: 22px;
    }

    .thankyou-order-info-wrapper,
    .thankyou-section {
        padding: 20px;
    }

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

    .thankyou-icon svg {
        width: 60px;
        height: 60px;
    }

    .order-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 0;
    }

    .order-info-item .value--highlight {
        font-size: 18px;
    }

    .qr-code-image {
        max-width: 200px;
    }
}
