/* =========================
   Thank You Page Base
========================= */

.custom-thankyou-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 64px 24px;
    color: var(--checkout-text)!important;
}

body.woocommerce-order-received .mm-checkout-page {
    background-color: var(--checkout-bg-form);
    border-radius: 8px;
    margin-bottom: 40px;
    padding-bottom: 0 !important;
}

.custom-thankyou-page * {
    box-sizing: border-box;
}

.custom-thankyou-page a {
    color: inherit;
}

.custom-thankyou-card {
    background: #fff;
    border: 1px solid rgba(21, 56, 79, 0.08);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(21, 56, 79, 0.08);
    padding: 32px;
    margin-bottom: 28px;
}


/* =========================
   Hero
========================= */

.custom-thankyou-hero {
    text-align: center;
    margin-bottom: 42px;
}

.custom-thankyou-hero h1 {
    margin: 0;
    color: var(--checkout-text);
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.15;
    font-weight: 700;
}


/* =========================
   Steps Card
========================= */

.custom-thankyou-steps {
    text-align: center;
}

.custom-thankyou-steps h2 {
    margin: 0 0 6px;
    color: var(--checkout-text);
    font-size: 25px;
    font-weight: 700;
}

.custom-thankyou-subline {
    margin: 0 0 34px;
    color: var(--checkout-text);
    font-size: 16px;
    font-weight: 700;
}

.custom-steps-grid {
    display: grid;
    grid-template-columns: 1fr 72px 1fr 72px 1fr;
    gap: 12px;
    align-items: start;
}

.custom-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-step-icon {
    width: 112px;
    margin-bottom: 20px;
}

.custom-step p {
    max-width: 235px;
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
}

.custom-step-arrow {
    display: block;
    position: relative;
    top: 20px;
}

.custom-thankyou-button,
.woocommerce .woocommerce-order-details .order-actions-button {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 4px;
    background: var(--checkout-button) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.custom-thankyou-button {
    margin-top: 26px;
}

.custom-thankyou-button:hover,
.woocommerce .woocommerce-order-details .order-actions-button:hover {
    background-color: var(--checkout-button-hover) !important;
}

.custom-thankyou-button::after {
    content: "›";
    margin-left: 12px;
    font-size: 24px;
    position: relative;
    top: -3px;
}

.custom-thankyou-info {
    display: flex;
    align-items: center;
    margin-top: 34px;
    padding: 18px 22px;
    border: 1px solid var(--checkout-green);
    border-radius: 8px;
    color: var(--checkout-green);
    background: var(--checkout-bg-field);
    font-size: 15px;
}

.custom-thankyou-info-icon {
    width: 32px;
    margin-right: 12px;
}


/* =========================
   Order Summary
========================= */

.custom-order-summary {
    display: grid;
    grid-template-columns:
        minmax(140px, 1fr)
        minmax(140px, 1fr)
        minmax(220px, 1.4fr)
        minmax(140px, 1fr);
    padding: 0;
    overflow: hidden;
}

.custom-summary-item {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 18px;
    text-align: center;
    border-right: 1px solid rgba(21, 56, 79, 0.12);
    min-width: 0;
}

.custom-summary-item strong {
    width: 100%;
    max-width: 220px;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
}

.custom-summary-item-email strong {
    max-width: 260px;
}

.custom-summary-item:last-child {
    border-right: 0;
}

.custom-summary-icon {
    width: 24px;
    display: block;
    flex-shrink: 0;
}

.custom-summary-item span {
    color: var(--checkout-text-grey);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.custom-summary-item strong {
    max-width: 100%;
    color: var(--checkout-text);
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.custom-summary-total,
.custom-summary-total .woocommerce-Price-amount,
.custom-summary-total .woocommerce-Price-currencySymbol {
    color: var(--checkout-green) !important;
}


/* =========================
   Order Details Card
========================= */

.custom-order-details {
    padding: 0;
    overflow: hidden;
}

.custom-order-details-section {
    margin: 0;
    padding: 32px;
}

.custom-order-details-title {
    color: var(--checkout-text);
    font-size: 25px;
    font-weight: 700;
}


/* =========================
   Order Table
========================= */

.custom-order-details-table {
    width: 100%;
    margin: 0 !important;
    border: 1px solid rgba(21, 56, 79, 0.14) !important;
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.custom-order-details-table th,
.custom-order-details-table td {
    padding: 17px 20px !important;
    border: 0 !important;
    color: var(--checkout-text)!important;
    vertical-align: middle;
}

.custom-order-details-table thead th {
    border-top: 0 !important;
    background: #fff;
    color: var(--checkout-text)!important;
    font-size: 15px;
    font-weight: 700;
}

.custom-order-details-table .product-total,
.custom-order-details-table td.product-total,
.custom-order-details-table tfoot td {
    text-align: right;
    white-space: nowrap;
}

.custom-order-line-item td {
    background: #fff;
}

.custom-order-product-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.custom-order-product-title,
.custom-order-product-title a {
    color: var(--checkout-text);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.custom-order-product-quantity,
.custom-order-product-quantity .product-quantity {
    color: var(--checkout-text);
    font-size: 15px;
    font-weight: 700;
}

.custom-order-product-description a {
    color: var(--checkout-green);
    font-weight: 700;
}

.custom-order-product-meta {
    color: var(--checkout-text-grey);
    font-size: 14px;
    line-height: 1.5;
}

.custom-order-product-meta:empty {
    display: none;
}

.custom-order-product-meta .wc-gzd-cart-info.wc-gzd-item-desc {
    display: none;
}

.custom-item-meta {
    margin: 10px 0 0 10px;
    background-color: var(--checkout-bg-form);
    padding: 6px 10px;
    border-radius: 4px;
}

.custom-item-meta dt,
.custom-item-meta dd {
    margin: 0;
}

.custom-item-meta dt {
    color: var(--checkout-text);
    font-weight: 700;
}

.custom-item-meta dd {
    margin-bottom: 8px;
    color: var(--checkout-text-grey);
}

.custom-item-meta p {
    margin: 0;
}

.custom-order-product-total {
    color: var(--checkout-text);
    font-weight: 700;
}

.custom-order-product-total .woocommerce-Price-amount {
    font-weight: 700;
}


/* =========================
   Totals / Actions
========================= */

.custom-order-actions th,
.custom-order-actions td {
    background: #fff;
    vertical-align: middle !important;
}

.custom-order-actions .button,
.custom-order-actions .woocommerce-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 16px !important;
    border-radius: 4px;
    background: var(--checkout-button) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 0 !important;
}

.custom-order-totals {
    background-color: #fff;
}

.custom-order-details-table .custom-order-totals .order-netsum th,
.custom-order-details-table .custom-order-totals .order-netsum td,
.custom-order-details-table .custom-order-totals .tax-total th,
.custom-order-details-table .custom-order-totals .tax-total td,
.woocommerce table.shop_table tfoot th {
    font-weight: 600;
}

.custom-order-grand-total th,
.custom-order-grand-total td {
    background: var(--checkout-bg-field);
    font-size: 17px;
}

.custom-order-details-table tbody tr > th,
.custom-order-details-table tbody tr > td,
.custom-order-details-table tfoot tr > th,
.custom-order-details-table tfoot tr > td {
    box-shadow: inset 0 1px 0 rgba(21, 56, 79, 0.1);
}

.custom-order-grand-total .woocommerce-Price-amount {
    color: var(--checkout-green) !important;
}


/* =========================
   Customer / Ticket Cards
========================= */

.custom-order-customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 28px;
    align-items: stretch;
    margin-bottom: 28px;
}

.custom-order-customer-grid .custom-thankyou-card,
.custom-order-customer-grid .woocommerce-customer-details {
    margin: 0;
    padding: 30px 36px;
    border: 1px solid rgba(21, 56, 79, 0.08);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(21, 56, 79, 0.08);
}

.custom-detail-card-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.custom-detail-card-icon {
    width: 52px;
    display: block;
    flex: 0 0 52px;
}

.custom-detail-card-title,
.custom-order-customer-grid .woocommerce-column__title {
    color: var(--checkout-text);
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 0;
    margin-top: 8px;
}

.custom-detail-card-content,
.custom-order-customer-grid address {
    margin: 0;
    padding-left: 74px !important;
    color: var(--checkout-text-grey);
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    border: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.custom-order-customer-grid address,
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--phone::before,
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--email::before
{
    line-height: 2;
}

.custom-detail-card-content p,
.custom-order-customer-grid address p {
    padding-bottom: 0.5em;
}

.custom-detail-card-content p:last-child,
.custom-order-customer-grid address p:last-child {
    margin-bottom: 0;
}

.custom-ticket-holder-name {
    font-size: 16px;
}

.custom-detail-card-content strong {
    color: var(--checkout-text);
    font-weight: 700;
}

.custom-ticket-holder + .custom-ticket-holder {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(21, 56, 79, 0.1);
}

/* =========================
   Mobile
========================= */

@media (max-width: 900px) {
    .custom-steps-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .custom-step-arrow {
        display: none;
    }

    .custom-thankyou-button {
        align-self: center;
    }

    .custom-thankyou-info {
        align-items: flex-start;
    }

    .custom-thankyou-info-text {
        text-align: left;
    }

    .custom-order-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .custom-summary-item:nth-child(2) {
        border-right: 0;
    }

    .custom-summary-item:nth-child(1),
    .custom-summary-item:nth-child(2) {
        border-bottom: 1px solid rgba(21, 56, 79, 0.12);
    }

    .custom-order-customer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .custom-thankyou-page {
        padding: 40px 16px;
    }

    .custom-thankyou-card {
        padding: 24px 18px;
    }

    .custom-order-summary {
        grid-template-columns: 1fr;
    }

    .custom-summary-item {
        border-right: 0;
        border-bottom: 1px solid rgba(21, 56, 79, 0.12);
    }

    .custom-summary-item:last-child {
        border-bottom: 0;
    }

    .custom-order-details-section {
        padding: 24px 18px;
    }

    .custom-order-details-table thead {
        display: none;
    }

    .custom-order-details-table,
    .custom-order-details-table tbody,
    .custom-order-details-table tfoot,
    .custom-order-details-table tr,
    .custom-order-details-table th,
    .custom-order-details-table td {
        display: block;
        width: 100%;
    }

    .custom-order-details-table th,
    .custom-order-details-table td {
        text-align: left !important;
    }

    .custom-order-details-table tfoot tr {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: stretch;
    }

    .custom-order-details-table tfoot tr > th,
    .custom-order-details-table tfoot tr > td {
        min-width: 0;
    }

    .custom-order-details-table .custom-order-actions > th,
    .custom-order-details-table .custom-order-actions > td {
        display: flex;
        align-items: center;
        padding: 17px 20px !important;
    }

    .custom-order-details-table .custom-order-actions > td {
        justify-content: flex-end;
    }

    .custom-order-details-table tfoot th,
    .custom-order-details-table tfoot td {
        width: auto;
    }

    .custom-order-product-main {
        flex-wrap: wrap;
    }

    .custom-order-customer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 0 24px;
    }

    .custom-order-customer-grid .custom-thankyou-card,
    .custom-order-customer-grid .woocommerce-customer-details {
        padding: 24px 20px;
    }

    .custom-detail-card-header {
        gap: 14px;
    }

    .custom-detail-card-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .custom-detail-card-title {
        font-size: 18px;
    }

    .custom-detail-card-content,
    .custom-order-customer-grid address {
        padding-left: 0 !important;
        margin-top: 18px;
    }
}
