/* Subscription & account UI: tier badges, plan-comparison table, navbar
   profile popover, auth forms. Matches the app design system (accent #6b8aff,
   accent3 #a06bff, cardBg #16191f, glass widgets). */

/* ---- Tier badges (feature cards, profile, tables) ---- */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid;
}
.tier-badge--compact { padding: 2px 8px; font-size: 0.6rem; }
.tier-badge--free {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(52, 211, 153, 0.10);
}
.tier-badge--big_leaguer {
    color: var(--accent-color, #6b8aff);
    border-color: rgba(var(--accent-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.10);
}
.tier-badge--all_star {
    color: var(--accent3-color, #a06bff);
    border-color: rgba(var(--accent3-rgb), 0.45);
    background: rgba(var(--accent3-rgb), 0.10);
}

/* Badge in the top-right of a homepage feature card. Sits in normal flow
   (a right-aligned row above the card icon) so it never overlaps the icon,
   even on the narrow 6-across desktop tiles. The card becomes a flex column
   so the content block (with its bottom-anchored CTA) flexes to the
   remaining height instead of overflowing the card padding. */
.home-feature-card { position: relative; }
.home-feature-card.home-tile-link { display: flex; flex-direction: column; }
.home-tile-badge {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    margin: -4px -4px 6px 0;
}
.home-feature-card.home-tile-link > div:not(.home-tile-badge) {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

/* ---- Plan-comparison table ---- */
.tier-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(22, 25, 31, 0.7);
    backdrop-filter: blur(10px);
}
.tier-table {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
}
.tier-th {
    padding: 16px 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    vertical-align: bottom;
}
.tier-th--label { width: 34%; }
.tier-head { text-align: center; display: grid; gap: 2px; justify-items: center; }
.tier-head-icon { font-size: 1.05rem; color: var(--accent-color, #6b8aff); }
.tier-th:nth-child(2) .tier-head-icon { color: #34d399; }
.tier-th:nth-child(4) .tier-head-icon { color: var(--accent3-color, #a06bff); }
.tier-head-name { font-weight: 800; color: var(--text-primary, #e8eaed); font-size: 1rem; }
.tier-head-price { font-weight: 700; color: var(--accent-color, #6b8aff); font-size: 0.85rem; }
.tier-th:nth-child(2) .tier-head-price { color: #34d399; }
.tier-th:nth-child(4) .tier-head-price { color: var(--accent3-color, #a06bff); }
.tier-head-tag { color: var(--text-secondary, #9ba1ad); font-size: 0.68rem; }
.tier-td {
    padding: 11px 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #e8eaed);
}
.tier-td--label { text-align: left; }
.tier-feature { font-weight: 600; font-size: 0.86rem; color: var(--text-primary, #e8eaed); }
.tier-feature-sub { font-size: 0.7rem; color: var(--text-secondary, #9ba1ad); }
.tier-check { color: #34d399; font-size: 0.9rem; }
.tier-dash { color: rgba(255, 255, 255, 0.22); font-weight: 700; }
.tier-text { color: var(--text-secondary, #9ba1ad); font-size: 0.8rem; }

/* Current-plan column highlight — a rounded ring nested inside the table
   container (borders follow the radius; box-shadow rings can't). */
.tier-th--current, .tier-td--current {
    background: rgba(var(--accent-rgb), 0.07);
    border-left: 2px solid rgba(var(--accent-rgb), 0.45);
    border-right: 2px solid rgba(var(--accent-rgb), 0.45);
}
.tier-th--current {
    border-top: 2px solid rgba(var(--accent-rgb), 0.45);
    border-radius: 14px 14px 0 0;
}
.tier-table tbody tr:last-child .tier-td--current {
    border-bottom: 2px solid rgba(var(--accent-rgb), 0.45);
    border-radius: 0 0 14px 14px;
}

/* Column CTAs */
.tier-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    transition: filter 0.12s ease, background 0.12s ease;
}
.tier-cta--big_leaguer { background: var(--accent-color, #6b8aff); color: #fff; }
.tier-cta--all_star {
    background: linear-gradient(135deg, rgba(var(--accent3-rgb), 1) 0%,
                rgba(var(--accent-rgb), 1) 100%);
    color: #fff;
}
.tier-cta--big_leaguer:hover, .tier-cta--all_star:hover { filter: brightness(1.1); }
.tier-cta--ghost {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-primary, #e8eaed);
}
.tier-cta--ghost:hover { background: rgba(255, 255, 255, 0.06); }
.tier-cta--current {
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.45);
    background: rgba(52, 211, 153, 0.10);
}
.tier-cta--muted { color: var(--text-secondary, #9ba1ad); font-weight: 600; }

/* ---- Navbar profile icon + popover ---- */
.profile-nav-wrap { position: relative; }
/* "Profile" row inside the collapsed (hamburger) mobile menu */
.profile-nav-item {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
@media (min-width: 768px) {
    .profile-nav-item { display: none; }
}
.profile-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #9ba1ad);
    font-size: 1.05rem;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.profile-nav-btn:hover {
    color: var(--text-primary, #e8eaed);
    border-color: rgba(var(--accent-rgb), 0.55);
    background: rgba(var(--accent-rgb), 0.10);
}
.profile-nav-btn--authed {
    color: var(--accent-color, #6b8aff);
    border-color: rgba(var(--accent-rgb), 0.55);
    background: rgba(var(--accent-rgb), 0.10);
}
/* Mobile: the round icon button is hidden — the profile entry lives inside
   the hamburger menu instead (see .profile-nav-item). */
@media (max-width: 767.98px) {
    .profile-nav-btn { display: none; }
}
.profile-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 70;
    width: 300px;
    max-width: calc(100vw - 24px);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(22, 25, 31, 0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
    animation: profile-pop-in 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes profile-pop-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.profile-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: transparent;
    border: none;
    cursor: default;
}

/* ---- Auth forms (popover + signup/reset pages) ---- */
.auth-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-primary, #e8eaed);
    margin-bottom: 10px;
}
.auth-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-primary, #e8eaed);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 8px;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.auth-input:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.7);
    background: rgba(var(--accent-rgb), 0.06);
}
.auth-input::placeholder { color: var(--text-secondary, #9ba1ad); }
.auth-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(var(--accent3-rgb), 1) 0%,
                rgba(var(--accent-rgb), 1) 100%);
    transition: filter 0.12s ease;
}
.auth-btn:hover { filter: brightness(1.08); }
.auth-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-primary, #e8eaed);
}
.auth-btn--ghost:hover { background: rgba(255, 255, 255, 0.05); }
.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.auth-link {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent-color, #6b8aff);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.auth-link:hover { text-decoration: underline; }
.auth-error { color: #f59e0b; font-size: 0.76rem; margin-top: 6px; min-height: 1em; }
.auth-ok { color: #34d399; font-size: 0.76rem; margin-top: 6px; min-height: 1em; }
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    padding: 26px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(22, 25, 31, 0.72);
    backdrop-filter: blur(10px);
}
.auth-card .auth-title { font-size: 1.25rem; }

/* Signed-in popover menu */
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--text-primary, #e8eaed);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.12s ease;
}
.profile-menu-item:hover { background: rgba(255, 255, 255, 0.06); }
.profile-menu-item i { width: 16px; color: var(--text-secondary, #9ba1ad); }
.profile-menu-head {
    padding: 4px 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
}
.profile-menu-email { font-size: 0.78rem; color: var(--text-secondary, #9ba1ad); }

/* ---- My Profile page ---- */
.profile-section {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    background: rgba(22, 25, 31, 0.7);
    backdrop-filter: blur(10px);
    padding: 22px;
}
.profile-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.profile-kv .k { color: var(--text-secondary, #9ba1ad); font-size: 0.82rem; }
.profile-kv .v { color: var(--text-primary, #e8eaed); font-size: 0.85rem; font-weight: 600; text-align: right; }
.profile-sub-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.30);
    background: rgba(var(--accent-rgb), 0.06);
}

/* ---- Saved fantasy leagues (My Profile manager + page dropdowns) ---- */
.pf-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #9ba1ad);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.pf-icon-btn:hover {
    color: var(--text-primary, #e8eaed);
    border-color: rgba(var(--accent-rgb), 0.55);
    background: rgba(var(--accent-rgb), 0.10);
}
.pf-icon-btn--danger:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(248, 113, 113, 0.10);
}
.pf-league-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pf-league-row:last-of-type { border-bottom: none; }
.pf-league-main {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 170px;
    min-width: 0;
}
.pf-league-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary, #e8eaed);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pf-league-id { font-size: 0.68rem; color: var(--text-secondary, #9ba1ad); }
.pf-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.22);
    transition: color 0.12s ease;
}
.pf-star-btn:hover { color: #fbbf24; }
.pf-star-btn--on { color: #fbbf24; }
.pf-league-team-dd { flex: 1 1 170px; min-width: 160px; }
.pf-league-analyze {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent-color, #6b8aff);
    white-space: nowrap;
    transition: filter 0.12s ease;
}
.pf-league-analyze:hover { filter: brightness(1.1); color: #fff; }

/* Saved-league dropdowns embedded in page controls */
.guru-league-dd { min-width: 190px; }

/* Player Explorer saved-league picker — compact type in both the control
   and the expanded option list (league names + ids run long). */
.pe-saved-league-dd .Select-control,
.pe-saved-league-dd .Select-value-label,
.pe-saved-league-dd .Select-placeholder,
.pe-saved-league-dd .Select-input {
    font-size: 0.78rem;
}
.pe-saved-league-dd .Select-menu-outer,
.pe-saved-league-dd .VirtualizedSelectOption {
    font-size: 0.78rem;
    line-height: 1.3;
}
