/* ============================================================
   ONE-PAGER DASHBOARD STYLES
   Scoped under .woocommerce-account .nf-dashboard to override Elementor
   ============================================================ */
   body.logged-in.woocommerce-account {
    background: #F7F8F8;
}
.logged-in.woocommerce-account h1.entry-title {
display: none;
}
.woocommerce-account .nf-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 auto;
    background: #F7F8F8;
    padding: 24px 10px;
    border-radius: 16px;
}

/* Two-column grid: main + sidebar on desktop */
.woocommerce-account .nf-dashboard .nf-dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Sidebar: hidden on mobile (VIP benefits are inside the VIP card, Perks is in main) */
.woocommerce-account .nf-dashboard .nf-dashboard-sidebar {
    display: none;
}

@media screen and (min-width: 768px) {
    .woocommerce-account .nf-dashboard .nf-dashboard-grid {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 24px;
        align-items: start;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-sidebar {
        display: flex;
        flex-direction: column;
        gap: 24px;
        position: sticky;
        top: 24px;
    }

    /* On desktop, hide VIP benefits + upgrade text inside the VIP card (shown in sidebar) */
    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefits-btn,
    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefits,
    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-next {
        display: none !important;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-formula {
    
        padding: 20px;
    }
}

.woocommerce-account .nf-dashboard .nf-dashboard-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
}

/* Prevent injected <br> (e.g. from wpautop/Elementor) from breaking alignment */
.woocommerce-account .nf-dashboard br {
    display: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-section-title {
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin: 0 0 16px 0;
}

/* ----------------------------------------
   Section 1 – Customer Info
   ---------------------------------------- */
.woocommerce-account .nf-dashboard .nf-dashboard-customer {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Wrap when there’s not enough space: name/email stay on first row, buttons move to second row */
.woocommerce-account .nf-dashboard .nf-dashboard-customer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.woocommerce-account .nf-dashboard .nf-dashboard-customer-info {
    flex: 1 1 200px;
    min-width: 150px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-customer-name {
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.woocommerce-account .nf-dashboard .nf-dashboard-customer-email {
    font-size: 14px;
    color: #666;
    margin: 0;
    word-break: break-all;
    line-height: 1.3;
}

.woocommerce-account .nf-dashboard .nf-dashboard-edit-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #222;
    border-radius: 7px;
    padding: 12px 10px;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
    height: auto;
    box-sizing: border-box;
    cursor: pointer;
}

.woocommerce-account .nf-dashboard .nf-dashboard-edit-profile-btn:hover {
    border-color: #222;
    color: #222;
    text-decoration: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-edit-profile-btn-text {
    display: inline;
    margin-top: 1px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-edit-profile-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: block;
}

.woocommerce-account .nf-dashboard .nf-dashboard-customer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #222;
    border-radius: 7px;
    padding: 14px 10px;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
    height: auto;
    box-sizing: border-box;
}

.woocommerce-account .nf-dashboard .nf-dashboard-logout-btn:hover {
    border-color: #222;
    color: #222;
    text-decoration: none;
}

/* Customer Edit Form (inline) */
.woocommerce-account .nf-dashboard .nf-dashboard-customer-edit-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E5E5;
}

.woocommerce-account .nf-dashboard .nf-dashboard-customer-edit-form .edit-account {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-field--half {
    min-width: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-row .nf-dashboard-form-field label {
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-field label .required {
    color: #e00;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-field .input-text {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    font-size: 14px;
    color: #222;
    background: #F7F8F8;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-field .input-text:focus {
    border-color: #33AB59;
    outline: none;
    background: #fff;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-field textarea.input-text {
    resize: vertical;
    min-height: 80px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-password-fieldset {
    border: none;
    padding: 0;
    margin: 8px 0 0 0;
    width: 100%;
    box-sizing: border-box;
    min-inline-size: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-password-fieldset legend {
    font-size: 15px;
    font-weight: 500;
    color: #222;
    margin-bottom: 10px;
    padding: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-password-fieldset .nf-dashboard-form-field {
    margin-bottom: 4px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-password-fieldset .nf-dashboard-form-row {
    margin-top: 4px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #33AB59;
    color: #fff !important;
    border: none;
    border-radius: 7px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    line-height: 1;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-save-btn:hover {
    background: #2a9a4d;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #222;
    border: 1px solid #222;
    border-radius: 7px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.woocommerce-account .nf-dashboard .nf-dashboard-form-cancel-btn:hover {
    background: #f5f5f5;
}

@media screen and (max-width: 480px) {
    .woocommerce-account .nf-dashboard .nf-dashboard-form-row {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------
   Section 2 – VIP Reward System
   ---------------------------------------- */

.woocommerce-account .nf-dashboard #nf-dashboard-vip {
    padding: 10px;
    position: relative;
}

/* Gray overlay for Nutrisslim employees (VIP not applicable) */
.woocommerce-account .nf-dashboard #nf-dashboard-vip.nf-dashboard-vip--employee-overlay .nf-dashboard-vip-employee-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-employee-overlay-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    padding: 0 1rem;
}

/* --- Header: discount info + tier badge --- */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    margin-bottom: 20px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-header-left {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-icon {
    flex-shrink: 0;
    line-height: 0;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-icon img {
    display: block;
    width: 60px;
    height: 60px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-discount-value {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-discount-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-top: 2px;
}

/* Tier badge — mobile default: inline in header */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    width: 94px;
    height: 94px;
    text-align: center;
    padding: 4px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge-label {
    font-size: 12px;
    line-height: 1.2;
    color: #888;
    display: block;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge-tier {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    display: block;
    margin-top: 2px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge-label--none {
    font-size: 10px;
    color: #999;
    text-align: center;
    line-height: 1.3;
    padding: 0 4px;
}

/* Desktop badge hidden on mobile, mobile badge hidden on desktop */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge--desktop {
    display: none;
}

/* Progress row: on desktop, flex row with progress + badge side by side */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-row {
    display: block;
}

@media screen and (min-width: 768px) {
    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge--mobile {
        display: none !important;
    }

    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-row {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-top: -30px;
    }

    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-row .nf-dashboard-vip-progress {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
        margin-top: 30px;
    }

    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge--desktop {
        display: flex;
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }

    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge--desktop .nf-dashboard-vip-badge-inner {
        width: 104px;
        height: 104px;
    }

    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge--desktop .nf-dashboard-vip-badge-label {
        font-size: 13px;
    }

    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-badge--desktop .nf-dashboard-vip-badge-tier {
        font-size: 16px;
    }
}

/* --- Progress bar --- */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress {
    margin-bottom: 16px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: visible;
    position: relative;
    background: #ffff;
    gap: 2px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-segment {
    flex: 1;
    border-radius:0 5px 5px 0;
    border-right: 1px solid #ffff;
    position: relative;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-segment-member   { z-index: 4; }
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-segment-green    { z-index: 3; }
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-segment-gold     { z-index: 2; }
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-segment-platinum { z-index: 1; }

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-segment + .nf-dashboard-vip-progress-segment {
    margin-left: -5px;
}

/* Checkmark marker — sits on top of the bar, larger than bar height */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-progress-marker svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* --- Tier labels below bar --- */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-labels {
    display: flex;
    margin-top: 4px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-label {
    flex: 1;
    text-align: center;
    line-height: 1.15;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-label-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-label-discount {
    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: 0.8;
    line-height: 1.15;
    margin-top: 1px;
}

/* --- Spending period info --- */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-period {
    padding: 8px 0 4px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-period-text {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-period-text strong {
    color: #555;
    font-weight: 600;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-downgrade-text {
    display: block;
    font-size: 12px;
    color: #C0392B;
    line-height: 1.5;
    margin-top: 4px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-downgrade-text strong {
    font-weight: 600;
}

/* --- Amount to next tier --- */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-next {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    margin-bottom: 4px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-next-line {
    flex: 1;
    height: 1px;
    background: #D9D9D9;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-next-content {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 14px;
    color: #444;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-next-arrow {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-next-amount strong {
    color: #222;
    font-weight: 700;
}

/* --- VIP Benefits button --- */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefits-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    border-radius: 16px 16px 0 0;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    margin: 0 -10px;
    margin-bottom: 0;
    cursor: pointer;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefits-btn span {
    color: #fff !important;
}

/* --- Benefits list --- */
.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefits-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefit-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #444;
}

.woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-benefit-item svg {
    flex-shrink: 0;
    display: block;
}

/* ----------------------------------------
   Sidebar – VIP Benefits (desktop)
   ---------------------------------------- */
/* Sidebar VIP: employee message when VIP not applicable */
.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-employee-message {
    padding: 16px;
    background: #e8e8e8;
    border-radius: 12px;
    color: #555;
    font-size: 0.9rem;
    text-align: center;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip > p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
    display: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-header {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 12px 16px;
    margin: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-header span {
    display: block;
    margin: 0;
    padding: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-upgrade {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #444;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-upgrade-line {
    flex: 1;
    height: 1px;
    background: #D9D9D9;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-upgrade-content {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-upgrade-arrow {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-upgrade strong {
    color: #222;
    font-weight: 700;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-benefits {
    padding: 16px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-benefits-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-benefits-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
}

.woocommerce-account .nf-dashboard .nf-dashboard-sidebar-vip-benefit-item svg {
    flex-shrink: 0;
    display: block;
}

/* ----------------------------------------
   Section 3 – My Formula
   ---------------------------------------- */
.woocommerce-account .nf-dashboard .nf-dashboard-formula {
    background: #F7F8F8;
    border-radius: 12px;
    padding: 0px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 8px 12px 8px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #E9E9E9;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-left: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    margin-top: 20px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-quiz-title {
    display: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-meta {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-actions {
    flex-shrink: 0;
    margin-right: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Formula cards: when space is tight, actions wrap to next line (flex-wrap only, no forced full width) */
@media (max-width: 576px) {
    .woocommerce-account .nf-dashboard .nf-dashboard-formula-details {
        min-width: 100px;
    }
}

/* Formula card: dropdown trigger (arrow) */
.woocommerce-account .nf-dashboard .nf-formula-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: #F7F8F8;
    border: 1px solid #E9E9E9;
    border-radius: 8px;
    cursor: pointer;
    color: #222;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
    z-index: 2;
}

.woocommerce-account .nf-dashboard .nf-formula-dropdown-trigger:hover {
    background: #EEEEEE;
    border-color: #ccc;
}

.woocommerce-account .nf-dashboard .nf-formula-dropdown-arrow {
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s;
}

.woocommerce-account .nf-dashboard .nf-formula-dropdown-trigger[aria-expanded="true"] .nf-formula-dropdown-arrow {
    transform: rotate(180deg);
}

/* Formula card: dropdown panel (Q&A + delete) */
.woocommerce-account .nf-dashboard .nf-formula-dropdown {
    flex-basis: 100%;
    width: 100%;
    padding: 16px 0 0 0;
    margin-top: 4px;
    border-top: 1px solid #E9E9E9;
}

.woocommerce-account .nf-dashboard .nf-formula-dropdown-content {
    background: #F7F8F8;
    border-radius: 8px;
    padding: 14px 16px;
}

.woocommerce-account .nf-dashboard .nf-formula-dropdown-loading {
    font-size: 14px;
    color: #666;
}

.woocommerce-account .nf-dashboard .nf-formula-dropdown-qa {
    font-size: 14px;
    line-height: 1.4;
}

.woocommerce-account .nf-dashboard .nf-formula-qa-row {
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid #E9E9E9;
}

.woocommerce-account .nf-dashboard .nf-formula-qa-row:last-child {
    border-bottom: none;
}

.woocommerce-account .nf-dashboard .nf-formula-qa-q {
    display: block;
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
}

.woocommerce-account .nf-dashboard .nf-formula-qa-a {
    display: block;
    color: #444;
    padding-left: 0;
}

.woocommerce-account .nf-dashboard .nf-formula-dropdown-delete-wrap {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #E9E9E9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 20px;
    row-gap: 24px;
}

.woocommerce-account .nf-dashboard .nf-formula-delete-quiz-btn {
    font-size: 13px;
    color: #b33;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    margin-right: 8px;
}

.woocommerce-account .nf-dashboard .nf-formula-delete-quiz-btn:hover {
    color: #922;
}

.woocommerce-account .nf-dashboard .nf-formula-close-answers-btn {
    font-size: 13px;
    color: #333;
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    margin-left: auto;
}

.woocommerce-account .nf-dashboard .nf-formula-close-answers-btn:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

/* When Delete + Close stack, add space above Close button (row-gap can be overridden by theme) */
@media screen and (max-width: 600px) {
    .woocommerce-account .nf-dashboard .nf-formula-dropdown-delete-wrap .nf-formula-close-answers-btn {
        margin-top: 24px;
    }
}

/* ID selector beats global body a:not(...) { color: #000 !important } */
.woocommerce-account .nf-dashboard #nf-dashboard-formula .nf-dashboard-formula-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #33AB59;
    color: #fff !important;
    padding: 5px 20px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border: none;
    white-space: nowrap;
}

.woocommerce-account .nf-dashboard #nf-dashboard-formula .nf-dashboard-formula-btn:hover {
    background-color: #2B9349;
    color: #fff !important;
    text-decoration: none !important;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-empty {
    text-align: center;
    padding: 32px 20px;
    background: #F7F8F8;
    border-radius: 12px;
    border: 1px dashed #D9D9D9;
}

.woocommerce-account .nf-dashboard .nf-dashboard-formula-empty span {
    font-size: 15px;
    color: #666;
}

/* Quiz subtitle (shown when user has both formulas and available quizzes) */
.woocommerce-account .nf-dashboard .nf-dashboard-quiz-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #444;
    margin: 20px 0 8px;
    padding: 0;
}

/* Quiz card styling – inherits formula card styles with minor overrides */
.woocommerce-account .nf-dashboard .nf-dashboard-quiz-card {
    border-style: dashed;
    border-color: #C5C5C5;
    background: #FAFBFB;
}

.woocommerce-account .nf-dashboard #nf-dashboard-formula .nf-dashboard-quiz-btn {
    background-color: #222;
}

.woocommerce-account .nf-dashboard #nf-dashboard-formula .nf-dashboard-quiz-btn:hover {
    background-color: #444;
}

/* ----------------------------------------
   Section – Affiliate program (main column only, not in sidebar)
   ---------------------------------------- */
.woocommerce-account .nf-dashboard .nf-dashboard-perks {
    background: #F7F8F8;
    border-radius: 16px;
    padding: 0;
}

/* Single white wrapper for card + apply form (same white block) */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-white-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    min-height: 0; /* avoid flex/height quirks – wrap only as tall as visible content */
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-white-wrap p:empty {
    display: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-white-wrap .nf-dashboard-perks-list {
    margin-bottom: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-white-wrap .nf-dashboard-perks-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card-icon svg {
    display: block;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card-content {
    flex: 1;
    min-width: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    line-height: 1.3;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    font-style: italic;
    margin-top: 2px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #222;
    border-radius: 7px;
    padding: 8px 16px;
    color: #222;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
    cursor: pointer;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-card-btn:hover {
    background: #f5f5f5;
    border-color: #222;
    color: #222;
    text-decoration: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-empty {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #E9E9E9;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-empty span {
    font-size: 14px;
    color: #999;
}

/* Coach apply form: inside same white wrapper, right under the card */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-apply-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E9E9E9;
}

/* When form is hidden, ensure it takes no space */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-apply-form.nf-dashboard-perks-apply-form--hidden {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    min-height: 0 !important;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-apply-form-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-apply-form-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-apply-form-desc {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
}

/* Affiliate program: one joined white block (like Order history) – title on gray, content in single white card */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: 16px;
    margin-top: 12px;
    overflow: hidden;
    padding: 20px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-content {
    min-width: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-content > *:first-child {
    margin-top: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-content > *:last-child {
    margin-bottom: 0;
}

/* One section: subsections separated by border-top, no separate cards */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_outer_wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_wrapper {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 20px 0;
    margin: 0;

}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_wrapper p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #444;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_wrapper p:last-child {
    margin-bottom: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_wrapper code {
    font-size: 13px;
    background: #F7F8F8;
    padding: 2px 6px;
    border-radius: 4px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_wrapper a {
    color: #1FB25A;
    text-decoration: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_wrapper a:hover {
    text-decoration: underline;
}

/* Expand button: show orders & commissions on click */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 0;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    background: #fff;
    border: 1px solid #222;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    transition: all 0.2s ease;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-expand-btn:hover {
    background: #f5f5f5;
    border-color: #222;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-expand-btn::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-expand-btn[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Collapsed by default; expandable content hidden */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-expandable {
    display: none;
    padding-top: 16px;
    border-top: 1px solid #E9E9E9;
    margin-top: 16px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate-expandable.is-open {
    display: block;
}

/* Table wrappers: no card, just padding + divider (part of one section) */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .unpaid_affiliate_table_wrapper,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .paid_affiliate_table_wrapper,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .master_unpaid_table_wrapper,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .master_paid_table_wrapper {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    margin: 0;
    border-bottom: 1px solid #E9E9E9;
    overflow-x: auto;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .master_paid_table_wrapper:last-child,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .paid_affiliate_table_wrapper:last-child,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .unpaid_affiliate_table_wrapper:last-child {
    border-bottom: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .unpaid_affiliate_table_wrapper h3,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .paid_affiliate_table_wrapper h3,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .master_unpaid_table_wrapper h3,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .master_paid_table_wrapper h3 {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    margin: 0 0 12px 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .unpaid_affiliate_table_wrapper p,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .paid_affiliate_table_wrapper p,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .master_unpaid_table_wrapper p,
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .master_paid_table_wrapper p {
    font-size: 14px;
    color: #444;
    margin: 0 0 8px 0;
}

/* Tables: same readability as Order history – row borders, 12px 20px padding */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .shop_table thead th {
    text-align: left;
    padding: 12px 20px;
    background: #F7F8F8;
    font-weight: 500;
    font-size: 12px;
    color: #666;
    text-transform: none;
    letter-spacing: 0;
    border: none;
    border-bottom: 1px solid #E9E9E9;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .shop_table tbody td {
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #E9E9E9;
    color: #222;
    font-size: 14px;
    vertical-align: middle;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .shop_table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .shop_table tbody tr:hover td {
    background: #FAFAFA;
}

/* Single divider after paid orders: remove double line (wrapper border + hr or next block's border) */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .paid_affiliate_table_wrapper + hr {
    display: none;
}
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .paid_affiliate_table_wrapper + * {
    border-top: none !important;
}

/* Other hr dividers in affiliate section */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_outer_wrapper hr {
    margin: 24px 0 0 0;
    padding-top: 24px;
    border: 0;
    border-top: 1px solid #E9E9E9;
}

.woocommerce-account .nf-dashboard .nf-dashboard-perks-affiliate .affiliate_info_outer_wrapper h2 {
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin: 0 0 16px 0;
}

/* Affiliate card: same wrap as formula – img+text stay on one line, button wraps to next */
@media screen and (max-width: 576px) {
    .woocommerce-account .nf-dashboard .nf-dashboard-perks-white-wrap .nf-dashboard-perks-card-content {
        min-width: 100px;
    }
    .woocommerce-account .nf-dashboard .nf-dashboard-perks-card-btn {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
}

/* ----------------------------------------
   Perks – Coach Application Modal
   ---------------------------------------- */
.nf-perks-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nf-perks-modal {
    width: 100%;
    max-width: 480px;
    margin: 20px;
}

.nf-perks-modal-content {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    max-height: 90vh;
    overflow-y: auto;
}

.nf-perks-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.nf-perks-modal-close:hover {
    color: #222;
}

.nf-perks-modal-header {
    margin-bottom: 20px;
}

.nf-perks-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0 0 6px;
}

.nf-perks-modal-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.nf-perks-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nf-perks-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nf-perks-form-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.nf-perks-form-field label .required {
    color: #e74c3c;
}

.woocommerce-account .nf-perks-form-field input[type="text"],
.woocommerce-account .nf-perks-form-field input[type="email"],
.woocommerce-account .nf-perks-form-field input[type="tel"],
.woocommerce-account .nf-perks-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    background: #fafafa;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.woocommerce-account .nf-perks-form-field input[type="text"]:focus,
.woocommerce-account .nf-perks-form-field input[type="email"]:focus,
.woocommerce-account .nf-perks-form-field input[type="tel"]:focus,
.woocommerce-account .nf-perks-form-field textarea:focus {
    border-color: #33AB59;
    outline: none;
    background: #fff;
}

.woocommerce-account .nf-perks-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.nf-perks-form-charcount {
    font-size: 11px;
    color: #aaa;
    text-align: right;
    margin-top: 2px;
}

.nf-perks-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

/* Affiliate Coach form: submit same size as edit-account Save button */
.woocommerce-account .nf-dashboard .nf-dashboard-perks-apply-form .nf-perks-form-submit {
    flex: none;
    padding: 10px 24px;
    border-radius: 7px;
}

.woocommerce-account .nf-perks-form-submit:hover {
    background: #2a9a4d;
}

.woocommerce-account .nf-perks-form-cancel {
    padding: 11px 20px;
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.woocommerce-account .nf-perks-form-cancel:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.nf-perks-modal-success {
    text-align: center;
    padding: 40px 20px;
}

.nf-perks-modal-success p {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin: 0 0 20px;
}

.nf-perks-modal-success .nf-perks-form-submit {
    display: inline-block;
    min-width: 120px;
}

/* ----------------------------------------
   Perks – Inline form (mobile)
   ---------------------------------------- */
.nf-perks-inline-form-wrap {
    flex-basis: 100%;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid #E5E5E5;
}

.nf-perks-inline-form {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
}

.nf-perks-inline-form .nf-perks-modal-header {
    margin-bottom: 16px;
}

.nf-perks-inline-form .nf-perks-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px;
}

.nf-perks-inline-form .nf-perks-modal-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.nf-perks-inline-form .nf-perks-form-actions {
    flex-direction: column;
}

.nf-perks-inline-form .woocommerce-account .nf-perks-form-cancel,
.nf-perks-inline-form .nf-perks-form-cancel {
    text-align: center;
}

.nf-perks-inline-success {
    background: transparent;
    border-radius: 0;
    padding: 20px 0;
    text-align: center;
    border: none;
}

.nf-perks-inline-success p {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* Coach thank-you popup (after form submit) */
.nf-coach-thankyou-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.nf-coach-thankyou-popup[hidden] {
    display: none !important;
}
.nf-coach-thankyou-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}
.nf-coach-thankyou-popup-content {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    max-width: 420px;
    width: 100%;
}
.nf-coach-thankyou-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0 0 10px;
}
.nf-coach-thankyou-popup-text {
    font-size: 14px;
    color: #333;
    margin: 0 0 20px;
    line-height: 1.5;
}
.nf-coach-thankyou-popup-close {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #C9A84C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.nf-coach-thankyou-popup-close:hover {
    background: #b8963a;
    color: #fff;
}

/* ----------------------------------------
   Section 5 – Order History
   ---------------------------------------- */
.woocommerce-account .nf-dashboard .nf-dashboard-orders {
    background: #F7F8F8;
    border-radius: 12px;
    padding: 0px;
}

/* White block for list (title stays on gray above) */
.woocommerce-account .nf-dashboard .nf-dashboard-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    margin-top: 12px;
    overflow: hidden;
    padding: 10px 20px 10px 20px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-row {
    border-bottom: 1px solid #E9E9E9;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-row:last-child {
    border-bottom: none;
}

/* Order row toggle: grid so columns align across all rows; keep one row as long as possible */
.woocommerce-account .nf-dashboard .nf-dashboard-order-toggle {
    display: grid;
    grid-template-columns: minmax(60px, auto) minmax(0, 1fr) 120px 24px;
    align-items: center;
    gap: 0 10px;
    padding: 12px 20px 12px 0;
    width: 100%;
    min-width: 0;
    background: none;
    border: none;
    text-align: left;
    color: #222;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-toggle-break {
    display: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-toggle:hover {
    opacity: 0.7;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-chevron {
    transition: transform 0.2s ease;
    justify-self: end;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-toggle--open .nf-dashboard-order-chevron {
    transform: rotate(180deg);
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-number {
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-date {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    width: 100%;
    min-width: 120px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Order detail panel */
.woocommerce-account .nf-dashboard .nf-dashboard-order-details {
    overflow: hidden;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-details-inner {
    background: #F7F8F8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Order items table */
.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table thead th {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 0 8px 0;
    border: none;
    text-align: left;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table th.nf-dashboard-oit-qty,
.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table td.nf-dashboard-oit-qty {
    width: 70px;
    text-align: center;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table th.nf-dashboard-oit-total,
.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table td.nf-dashboard-oit-total {
    width: 80px;
    text-align: right;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table tbody tr,
.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table tbody tr:nth-child(2n),
.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table tbody tr:nth-child(even),
.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table tbody tr:nth-child(odd) {
    background: transparent !important;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table tbody td {
    padding: 8px 0;
    border: none;
    font-size: 13px;
    color: #222;
    vertical-align: middle;
    background: transparent !important;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table td.nf-dashboard-oit-qty {
    color: #555;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-items-table td.nf-dashboard-oit-total {
    font-weight: 500;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-item-product {
    display: flex;
    align-items: center;
    gap: 10px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-item-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-item-thumb img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

@media screen and (max-width: 374px) {
    .woocommerce-account .nf-dashboard .nf-dashboard-order-item-thumb {
        display: none;
    }
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-item-name {
    font-size: 13px;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Order summary rows */
.woocommerce-account .nf-dashboard .nf-dashboard-order-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid #E0E0E0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-summary-row--total {
    font-weight: 600;
    color: #222;
    padding-top: 4px;
    border-top: 1px solid #E0E0E0;
    margin-top: 2px;
}

/* Addresses */
.woocommerce-account .nf-dashboard .nf-dashboard-order-addresses {
    display: flex;
    gap: 24px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-address {
    flex: 1;
    min-width: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-address-title {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-address-text {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

/* Parcel tracking placeholder */
.woocommerce-account .nf-dashboard .nf-dashboard-order-tracking {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFF8E1;
    border: 1px dashed #E0C860;
    border-radius: 6px;
    padding: 10px 14px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-tracking-label {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-tracking-url {
    font-size: 13px;
    font-weight: 600;
    color: #9E7C00;
}

/* Status badge colours (reuse the same palette as the orders table) */
.woocommerce-account .nf-dashboard .nf-dashboard-order-status--processing,
.woocommerce-account .nf-dashboard .nf-dashboard-order-status--pending {
    background-color: #D4EDDA;
    color: #155724;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-status--on-hold {
    background-color: #F5E6C8;
    color: #5A4B35;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-status--completed {
    background-color: #E9ECEF;
    color: #495057;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-status--cancelled {
    background-color: #E8E8E8;
    color: #4A4A4A;
}

.woocommerce-account .nf-dashboard .nf-dashboard-order-status--refunded,
.woocommerce-account .nf-dashboard .nf-dashboard-order-status--failed {
    background-color: #F8D7DA;
    color: #721C24;
}

.woocommerce-account .nf-dashboard .nf-dashboard-orders-empty {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    margin-top: 12px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-orders-empty span {
    font-size: 14px;
    color: #999;
    margin: 0;
}

.woocommerce-account .nf-dashboard .nf-dashboard-orders-footer {
    margin-top: 0;
    padding: 12px 0 15px 10px;
    background: #fff;
    border-radius: 0 0 12px 12px;
}

.woocommerce-account .nf-dashboard .nf-dashboard-view-more-orders {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F7F8F8;
    border: 1px solid #D9D9D9;
    border-radius: 50px;
    padding: 8px 20px;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
}

.woocommerce-account .nf-dashboard .nf-dashboard-view-more-orders:hover {
    border-color: #222;
    color: #222;
    text-decoration: none;
}

.woocommerce-account .nf-dashboard .nf-dashboard-view-more-orders-text {
    display: inline;
}

.woocommerce-account .nf-dashboard .nf-dashboard-view-more-orders svg {
    flex-shrink: 0;
}

/* ----------------------------------------
   Dashboard responsive tweaks
   ---------------------------------------- */
@media screen and (max-width: 374px) {
    .woocommerce-account .nf-dashboard #nf-dashboard-vip .nf-dashboard-vip-header-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media screen and (max-width: 360px) {
    /* Two-row grid only when very narrow: row 1 = number, date; row 2 = status + chevron */
    .woocommerce-account .nf-dashboard .nf-dashboard-order-toggle {
        grid-template-columns: minmax(60px, auto) minmax(0, 1fr);
        grid-template-rows: auto 0 auto;
        gap: 4px 10px;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-order-toggle-break {
        display: block;
        grid-column: 1 / -1;
        grid-row: 2;
        height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-order-number {
        grid-column: 1;
        grid-row: 1;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-order-date {
        grid-column: 2;
        grid-row: 1;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-order-status {
        grid-column: 1;
        grid-row: 3;
        max-width: none;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-order-chevron {
        grid-column: 2;
        grid-row: 3;
        justify-self: start;
    }

    .woocommerce-account .nf-dashboard .nf-dashboard-order-addresses {
        flex-direction: column;
        gap: 12px;
    }
}