/**
 * Order-received invoice. Desktop and mobile share the sheet.
 * The PDF bar is fixed above the dock only under 782px.
 * Brand: #ff6b00 #f59e0b #0f172a #ffd600 #7b2fbe #fafbff
 */

.woocommerce-order-received .woocommerce {
    max-width: 100%;
}

.nof-thankyou {
    max-width: 920px;
    margin: 28px auto 48px;
    padding: 0 20px 24px;
    direction: rtl;
    color: #0f172a;
    box-sizing: border-box;
}

.nof-ty-sheet {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nof-ty-hero {
    background: #fff;
    border: 1px solid #ffe0c2;
    border-radius: 28px;
    padding: 28px 28px 24px;
    box-shadow: 0 16px 40px rgba(255, 107, 0, 0.08);
    text-align: center;
}

.nof-ty-hero--fail {
    border-color: #fecaca;
    box-shadow: 0 16px 40px rgba(127, 29, 29, 0.08);
}

.nof-ty-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #0f172a;
    border-radius: 20px;
    padding: 8px;
    margin: 0 auto 12px;
    display: block;
}

.nof-ty-kicker {
    margin: 0 0 6px;
    color: #c2410c;
    font-weight: 800;
}

.nof-ty-hero h1 {
    margin: 0 0 8px;
    font-size: 1.7rem;
    line-height: 1.45;
    color: #0f172a;
}

.nof-ty-hero p {
    margin: 0 auto;
    max-width: 38rem;
    color: #334155;
    line-height: 1.9;
}

.nof-ty-hero strong {
    color: #0f172a;
}

.nof-ty-ids {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nof-ty-ids > div,
.nof-ty-card,
.nof-ty-meta > div {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.nof-ty-ids > div {
    padding: 16px 16px 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.nof-ty-ids span,
.nof-ty-meta dt {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.nof-ty-ids span {
    flex: 1 0 100%;
}

.nof-ty-ids strong {
    font-size: 1.35rem;
    letter-spacing: 0;
    color: #0f172a;
}

.nof-ty-track {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
}

.nof-ty-copy {
    margin-right: auto;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c2410c;
    border-radius: 999px;
    min-height: 36px;
    padding: 0 14px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.nof-ty-copy.is-copied {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}

.nof-ty-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.nof-ty-meta > div {
    padding: 14px 16px;
}

.nof-ty-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
    font-size: 1.02rem;
}

.nof-ty-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nof-ty-steps li {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.nof-ty-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #334155;
    flex: 0 0 auto;
}

.nof-ty-steps .is-done {
    color: #047857;
    border-color: #a7f3d0;
}

.nof-ty-steps .is-done .nof-ty-num {
    background: #d1fae5;
    color: #047857;
}

.nof-ty-steps .is-current {
    color: #c2410c;
    border-color: #fdba74;
    background: #fff7ed;
}

.nof-ty-steps .is-current .nof-ty-num {
    background: #ff6b00;
    color: #fff;
}

.nof-ty-card {
    padding: 16px 18px 18px;
}

.nof-ty-card h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.nof-ty-table {
    width: 100%;
    border-collapse: collapse;
}

.nof-ty-table th,
.nof-ty-table td {
    text-align: right;
    padding: 10px 8px;
    border-bottom: 1px solid #e8eef5;
    vertical-align: top;
}

.nof-ty-table th {
    color: #64748b;
    font-size: 0.8rem;
}

.nof-ty-table small {
    display: block;
    margin-top: 4px;
    color: #9a3412;
    font-weight: 700;
}

.nof-ty-totals {
    margin: 12px 0 0;
    display: grid;
    gap: 6px;
}

.nof-ty-totals div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #334155;
}

.nof-ty-totals dt,
.nof-ty-totals dd {
    margin: 0;
}

.nof-ty-totals .is-grand {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #e8eef5;
    color: #c2410c;
    font-size: 1.15rem;
    font-weight: 800;
}

.nof-ty-pay-notes table {
    width: 100%;
}

.nof-ty-pay-notes th,
.nof-ty-pay-notes td {
    text-align: right;
    padding: 6px 0;
}

.nof-ty-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nof-ty-addresses address,
.nof-ty-addresses p {
    font-style: normal;
    line-height: 1.85;
    margin: 0;
}

.nof-ty-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nof-ty-btn {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.nof-ty-btn.main,
.nof-ty-pdf-bar a {
    background: linear-gradient(135deg, #ff6b00, #f59e0b);
    color: #fff;
}

.nof-ty-pdf-inline {
    min-height: 58px;
    font-size: 1.05rem;
}

.nof-ty-btn.ghost {
    background: #fff;
    color: #0f172a;
    border-color: #e2e8f0;
}

.nof-invoice-row {
    margin: 16px 0;
}

.nof-ty-pdf-bar {
    display: none;
}

@media (max-width: 782px) {
    .woocommerce-order-received {
        overflow-x: clip;
    }

    .nof-thankyou {
        margin: 8px auto 4px;
        padding: 0 12px 12px;
        max-width: 100%;
    }

    .nof-ty-hero {
        border-radius: 22px;
        padding: 20px 16px;
    }

    .nof-ty-hero h1 {
        font-size: 1.28rem;
    }

    .nof-ty-ids,
    .nof-ty-meta,
    .nof-ty-addresses {
        grid-template-columns: 1fr;
    }

    .nof-ty-steps {
        grid-template-columns: 1fr 1fr;
    }

    .nof-ty-steps li {
        align-items: flex-start;
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .nof-ty-pdf-inline {
        display: none !important;
    }

    .nof-ty-table thead {
        display: none;
    }

    .nof-ty-table,
    .nof-ty-table tbody,
    .nof-ty-table tr,
    .nof-ty-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .nof-ty-table tr {
        border: 1px solid #e8eef5;
        border-radius: 16px;
        padding: 10px 12px;
        margin-bottom: 10px;
        background: #fafbff;
    }

    .nof-ty-table td {
        border: 0;
        padding: 4px 0;
    }

    .nof-ty-table td[data-label]::before {
        content: attr(data-label) " ";
        color: #64748b;
        font-weight: 700;
    }

    .nof-ty-pdf-bar {
        display: block !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: var(--nof-dock-h, 72px) !important;
        z-index: 10045 !important;
        padding: 8px 12px !important;
        background: #fff;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
        box-sizing: border-box;
    }

    .nof-ty-pdf-bar a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 52px;
        border-radius: 14px;
        font-weight: 800;
        text-decoration: none;
    }
}
