.nhl-subs-selector {
    --nhl-accent: #0e7a6d;
    --nhl-bg: #f7faf9;
    --nhl-border: #e1ecea;
    --nhl-text: #1f2937;
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid var(--nhl-border);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, var(--nhl-bg));
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06)
}

/* Compact layout (PDP option rows) */
.nhl-subs-compact { max-width: 560px; }
.nhl-subs-compact > label.nhl-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 6px 0;
}
.nhl-subs-compact > label.nhl-option input[type=radio] { margin-right: 6px; }
.nhl-subs-compact > label.nhl-option .nhl-option__title { font-weight: 600; color: var(--nhl-text, #111827); }
.nhl-subs-compact > label.nhl-option .nhl-option__price { margin-left: auto; font-weight: 600; color: var(--nhl-text, #111827); }
.nhl-subs-compact > label.nhl-option .nhl-price-subs .old { color: #9ca3af; text-decoration: line-through; margin-right: 8px; font-weight: 400; }
.nhl-subs-compact > label.nhl-option .nhl-price-subs .new { color: var(--nhl-text, #111827); font-weight: 700; }
.nhl-badge { background: #1dbf73; color:#fff; border-radius: 999px; padding: 2px 7px; font-size: 11px; font-weight: 700; margin-left: 8px; }
.nhl-subs-compact > label.nhl-option.is-checked { border-color: #111; }

.nhl-subs-selector label {
    display: block;
    margin: .4rem 0;
    color: var(--nhl-text);
    font-weight: 500
}

/* Segmented control style for radio options */
.nhl-subs-selector>label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    border: 1px solid var(--nhl-border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    transition: .15s ease-in-out;
    border-color: transparent;
    line-height: 1.2;
}

.nhl-subs-selector>label:hover {
    box-shadow: 0 0 0 3px rgba(14, 122, 109, .08)
}

.nhl-subs-selector input[type=radio],
.nhl-subs-selector input[type=checkbox] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    position: relative;
    box-sizing: border-box;
    border: 1px solid #E5E5E5;
    background: #fff;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0 .25rem 0 0;
    align-self: center;
}

.nhl-subs-selector input[type=radio]:focus,
.nhl-subs-selector input[type=checkbox]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 152, 93, .2);
}

.nhl-subs-selector input[type=radio]:checked,
.nhl-subs-selector input[type=checkbox]:checked {
    border-color: #1a985d;
}

/* inner dot for radio */
.nhl-subs-selector input[type=radio]::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a985d;
    transform: scale(.6);
    opacity: 0;
    transition: opacity .12s ease, transform .12s ease;
}

.nhl-subs-selector input[type=radio]:checked::after {
    opacity: 1;
    transform: scale(1);
}

@supports(selector(:has(*))) {
    .nhl-subs-selector>label:has(input[type=radio]:checked) {
        background: rgba(14, 122, 109, .08);
        border-color: rgba(14, 122, 109, .25)
    }
}

/* Fallback when :has is not supported */
.nhl-subs-selector>label.is-checked {
    background: rgba(14, 122, 109, .08);
    border-color: rgba(14, 122, 109, .25)
}

/* Interval dropdown */
.nhl-subs-interval {
    margin-top: .5rem
}

.nhl-subs-interval label {
    font-weight: 600
}

.nhl-subs-interval select.nhl-select-native {
    display: none !important
}

/* Custom select */
.nhl-select {
    position: relative;
    display: block;
    min-width: 200px
}

.nhl-select__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    background: #fff;
    border: 1px solid var(--nhl-border);
    border-radius: 8px;
    padding: .55rem .75rem;
    line-height: 1.2;
    font-size: 14px;
    color: var(--nhl-text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    cursor: pointer
}

.nhl-select__btn::after {
    content: "▾";
    font-size: 12px;
    line-height: 1;
    color: #6b7280;
    /* neutral */
    transform: translateY(-1px);
    transition: transform .15s ease;
}

.nhl-select__btn:focus {
    outline: none;
    border-color: var(--nhl-accent);
    box-shadow: 0 0 0 3px rgba(14, 122, 109, .15)
}

.nhl-select.is-open .nhl-select__btn {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px
}

.nhl-select.is-open .nhl-select__btn::after {
    transform: rotate(180deg) translateY(1px);
}

.nhl-select__list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid var(--nhl-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    max-height: 240px;
    overflow: auto;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    display: none
}

.nhl-select.is-open .nhl-select__list {
    display: block
}

.nhl-select__list .nhl-select__option {
    padding: .5rem .75rem;
    cursor: pointer;
    color: var(--nhl-text);
    list-style: none;
    margin-left: 0;
}

.nhl-select__option[aria-selected="true"] {
    background: rgba(14, 122, 109, .08)
}

.nhl-select__option:hover {
    background: #f3f6f5
}

.nhl-select__option.is-active {
    background: #eef4f3;
}

.nhl-select__option[aria-selected="true"]::after {
    content: "✓";
    float: right;
    color: #1a985d;
}

.nhl-animate-left .variation:not(.remove) {
    margin-left: 75px
}

/* My Account – Subscriptions table styling */
.woocommerce-account table.my_account_subs {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--nhl-border, #e1ecea);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

/* PDP – interval pills */
.nhl-interval-pills {
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
}

.nhl-pill {
    background: #fff;
    border: 1px solid var(--nhl-border, #e1ecea);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1;
    color: var(--nhl-text, #1f2937);
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.nhl-pill:hover {
    background: #f7faf9;
}

.nhl-pill.is-active {
    border-color: #1dbf73;
    background: rgba(29, 191, 115, .08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

.nhl-subs-price { display:none; }

.nhl-subs-cta {
    font-size: 16px;
    margin-top: 10px;
    font-weight: 600;
    color: var(--nhl-text, #1f2937);
}

.nhl-subs-benefits { margin-top: 8px; margin-bottom: 8px; padding: 8px 10px; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; text-align: left; }

.nhl-subs-headline { font-weight: 700; margin: 0 0 4px 0; color: var(--nhl-text, #1f2937); text-align: left; font-size: 14px; }

/* Standard bullet list (one per line) */
.nhl-benefits-list { margin: 6px 0 0 18px; padding: 0; list-style: disc; }
.nhl-benefits-list li { margin: 2px 0; font-size: 13px; color: #374151; }
/* Increase specificity to win over theme rules */
.nhl-subs-selector .nhl-subs-benefits .nhl-benefits-list { list-style: disc outside; margin-left: 1.2rem; }
.nhl-subs-selector .nhl-subs-benefits .nhl-benefits-list li { font-size: 13px; line-height: 1.45; color: #374151; }

.woocommerce-account table.my_account_subs th,
.woocommerce-account table.my_account_subs td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf3f2;
    vertical-align: middle;
    color: var(--nhl-text, #1f2937);
}

.woocommerce-account table.my_account_subs thead th {
    background: var(--nhl-bg, #f7faf9);
    font-weight: 600;
    color: #374151;
}

.woocommerce-account table.my_account_subs tbody tr:last-child td {
    border-bottom: 0;
}

/* Compact action buttons */
.woocommerce-account table.my_account_subs .button {
    font-size: 13px;
    line-height: 1.2;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 2px 6px 2px 0;
}

/* NHL button variants aligned with PDP colors */
.woocommerce-account .nhl-btn-primary {
    background: #1dbf73;
    border: 1px solid #1dbf73;
    color: #fff;
}

.woocommerce-account .nhl-btn-primary:hover {
    background: #19ac67;
    border-color: #19ac67;
}

.woocommerce-account .nhl-btn-secondary {
    background: #1e556a;
    border: 1px solid #1e556a;
    color: #fff;
}

.woocommerce-account .nhl-btn-secondary:hover {
    background: #174a5b;
    border-color: #174a5b;
}

.woocommerce-account .nhl-btn-danger {
    background: #fff;
    border: 1px solid #1e556a;
    color: #1e556a;
}

.woocommerce-account .nhl-btn-danger:hover {
    background: rgba(30, 85, 106, .08);
}

/* Compact button baseline + icons */
.woocommerce-account .nhl-btn {
    display: inline-flex;
    align-items: center;
    margin: 0px;
    gap: 4px;
    padding: 6px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    border-radius: 8px !important;
    text-transform: none !important;
    letter-spacing: .2px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.woocommerce-account .nhl-btn.nhl-btn-sm {
    padding: 4px 8px !important;
    font-size: 12px !important;
}

.woocommerce-account .nhl-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Modal */
.nhl-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.nhl-modal.is-open {
    display: block;
}

.nhl-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
}

.nhl-modal__dialog {
    position: relative;
    max-width: 440px;
    width: calc(100% - 32px);
    margin: 10vh auto 0;
    background: #fff;
    border: 1px solid var(--nhl-border, #e1ecea);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
    padding: 16px;
}

.nhl-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.nhl-modal__title {
    font-weight: 700;
    color: var(--nhl-text, #1f2937);
}

.nhl-modal__close {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #6b7280;
    padding: 6px;
    border-radius: 6px;
}

.nhl-modal__close:hover {
    background: #f3f6f5;
}

.nhl-modal__body {
    display: grid;
    gap: 10px;
}

.nhl-modal__actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Card layout for My Account subscriptions */
.nhl-sub-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 880px) {
    .nhl-sub-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.nhl-sub-card {
    background: #fff;
    border: 1px solid var(--nhl-border, #e1ecea);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    padding: 14px 16px;
}

.nhl-sub-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.nhl-sub-card__title {
    font-weight: 600;
    color: var(--nhl-text, #1f2937);
}

.nhl-sub-card__price {
    font-weight: 700;
    color: var(--nhl-text, #1f2937);
}

.nhl-sub-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 10px;
}

.nhl-sub-card__meta-item strong {
    font-weight: 600;
}

.nhl-sub-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.nhl-sub-card__interval {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nhl-sub-card__interval select {
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--nhl-border, #e1ecea);
    border-radius: 6px;
    background: #fff;
}

.nhl-sub-card__muted {
    color: #6b7280;
    font-size: 12px;
}

.woocommerce-account table.my_account_subs select {
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--nhl-border, #e1ecea);
    border-radius: 6px;
    background: #fff;
}

.woocommerce-account table.my_account_subs td:nth-child(1),
.woocommerce-account table.my_account_subs td:nth-child(5) {
    white-space: nowrap;
}

.woocommerce-account table.my_account_subs td:nth-child(8) {
    min-width: 320px;
}

/* Status coloring (best-effort text match) */
.woocommerce-account table.my_account_subs td:has(> .nhl-status-active),
.woocommerce-account table.my_account_subs td:has(> .nhl-status-paused),
.woocommerce-account table.my_account_subs td:has(> .nhl-status-canceled) {
    white-space: nowrap;
}

.nhl-status-active {
    color: #1a985d;
    font-weight: 600;
}

.nhl-status-paused {
    color: #92400e;
    font-weight: 600;
}

.nhl-status-canceled {
    color: #991b1b;
    font-weight: 600;
}

/* My Account wrapper adopts PDP color tokens */
.nhl-subs-account {
    --nhl-accent: #0e7a6d;
    --nhl-bg: #f7faf9;
    --nhl-border: #e1ecea;
    --nhl-text: #1f2937;
}
