/**
 *  ACCOUNT SECTION - "Spotify-style" account menu & pages
 *  Layers on top of the Hyper theme + tkcs.css, no overrides of core theme rules.
 */

/* ---------- Avatar ---------- */

.acc-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    flex-shrink: 0;
    position: relative;
}

.acc-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    flex-shrink: 0;
}

.acc-avatar-edit {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg, #2b2f38);
    border: 2px solid var(--bs-border-color, rgba(255,255,255,.15));
    cursor: pointer;
    font-size: .85rem;
}

.acc-avatar img,
.acc-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ---------- Hero card ---------- */

.acc-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.acc-hero .acc-name {
    font-weight: 700;
    margin-bottom: .15rem;
}

.acc-hero .acc-email {
    opacity: .65;
    font-size: .9rem;
}

.acc-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ---------- Left account nav (pills, Spotify-account-page style) ---------- */

.acc-nav {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.acc-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .9rem;
    border-radius: .65rem;
    color: inherit;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    opacity: .78;
    border-left: 3px solid transparent;
    transition: background-color .15s ease, opacity .15s ease;
}

.acc-nav a i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.acc-nav a:hover {
    background-color: rgba(127, 127, 127, .12);
    opacity: 1;
}

.acc-nav a.active {
    background-color: rgba(124, 58, 237, .14);
    border-left-color: #7c3aed;
    opacity: 1;
    font-weight: 700;
}

/* ---------- Topbar user dropdown, Spotify "account menu" look ---------- */

.acc-dropdown {
    min-width: 260px;
    padding: 0;
    overflow: hidden;
}

.acc-dropdown .acc-dropdown-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1rem .85rem;
    border-bottom: 1px solid var(--bs-border-color, rgba(255,255,255,.08));
}

.acc-dropdown .acc-dropdown-head .acc-dropdown-name {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 0;
}

.acc-dropdown .acc-dropdown-head .acc-dropdown-plan {
    font-size: .72rem;
    opacity: .65;
}

.acc-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem 1rem;
    font-size: .88rem;
}

.acc-dropdown .dropdown-item i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    opacity: .8;
}

.acc-dropdown .dropdown-item.text-danger i {
    opacity: 1;
}

/* ---------- Plan / pricing cards ---------- */

.acc-plan-card {
    height: 100%;
    position: relative;
    border: 1px solid var(--bs-border-color, rgba(255,255,255,.08));
    transition: transform .2s ease, border-color .2s ease;
}

.acc-plan-card.acc-plan-current {
    border-color: #7c3aed;
    box-shadow: 0 0 0 1px #7c3aed;
}

.acc-plan-card.acc-plan-featured {
    border-color: rgba(124, 58, 237, .5);
}

.acc-plan-ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .3rem .8rem;
    border-radius: 50px;
    white-space: nowrap;
}

.acc-plan-price {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
}

.acc-plan-price small {
    font-size: .95rem;
    font-weight: 500;
    opacity: .6;
}

.acc-plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.acc-plan-card ul li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .35rem 0;
    font-size: .87rem;
}

.acc-plan-card ul li i {
    margin-top: .15rem;
    flex-shrink: 0;
}

/* ---------- Password strength ---------- */

.acc-strength {
    height: 6px;
    border-radius: 50px;
    overflow: hidden;
    background: rgba(127,127,127,.2);
}

.acc-strength > div {
    height: 100%;
    border-radius: 50px;
    transition: width .25s ease, background-color .25s ease;
}

/* ---------- Sessions / devices ---------- */

.acc-session-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--bs-border-color, rgba(255,255,255,.06));
}

.acc-session-row:last-child {
    border-bottom: none;
}

.acc-session-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ---------- Receipts ---------- */

.acc-receipt-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 50px;
}

@media (max-width: 991.98px) {
    .acc-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: .4rem;
        padding-bottom: .25rem;
    }
    .acc-nav a {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    .acc-nav a.active {
        border-left-color: transparent;
        border-bottom-color: #7c3aed;
    }
}

/* ---------- Monthly / yearly switch on the subscription page ---------- */

.acc-interval {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.acc-interval-opt {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0;
    padding: .3rem .8rem;
    border: 1px solid var(--bs-border-color, rgba(255,255,255,.12));
    border-radius: 50px;
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.acc-interval-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.acc-interval-opt.active {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, .16);
    font-weight: 600;
}

.acc-interval-opt:focus-within {
    outline: 2px solid rgba(124, 58, 237, .6);
    outline-offset: 2px;
}

/* ---------- Printing a receipt: only the receipt, on white paper ---------- */
@media print {
    body * { visibility: hidden; }
    #receipt, #receipt * { visibility: visible; }
    #receipt { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; color: #000 !important; border: 0 !important; box-shadow: none !important; }
    #receipt .text-muted { color: #444 !important; }
}

/* ---------- admin: songs are waiting for approval (dot on the avatar in the top bar) ---------- */

.nav-user { position: relative; }

.acc-pending-dot {
    position: absolute;
    left: 30px;
    top: 14px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #f43f5e;
    border: 2px solid var(--bs-topbar-bg, #2f3742);
}

/* ---------- admin looking into a member's account (Impersonation::Banner) ---------- */

.imp-bar {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 2100;
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: calc(100vw - 1.5rem);
    padding: .55rem .6rem .55rem 1rem;
    border-radius: 999px;
    color: #1f2937;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 12px 38px rgba(0, 0, 0, .45), 0 0 0 3px rgba(251, 191, 36, .25);
    font-size: .85rem;
}

.imp-bar .imp-eye { font-size: 1.2rem; line-height: 1; }
.imp-bar .imp-ro { opacity: .75; }
.imp-bar .imp-stop { border: 0; border-radius: 999px; padding: .4rem .9rem; font-weight: 700; white-space: nowrap; color: #fff; background: #1f2937; }
.imp-bar .imp-stop:hover { background: #111827; }
.imp-bar .imp-stop:disabled { opacity: .6; }

@media (max-width: 767.98px) {
    .imp-bar { border-radius: 16px; flex-wrap: wrap; bottom: .5rem; }
    .imp-bar .imp-ro { display: none; }
}

@media (min-width: 768px) {
    .imp-bar .imp-text { white-space: nowrap; }
}

/* maintenance is on (SiteSettings::AdminBanner): administrators are the only ones who see the site */
.mt-bar {
    position: sticky;
    top: 0;
    z-index: 2050;
    padding: .4rem 1rem;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    color: #1f2937;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.mt-bar a { color: #1f2937; text-decoration: underline; margin-left: .35rem; }
