/**
 * Member accounts — header avatar, sign in modal tweaks, series page
 * watchlist button and the /profile/ pages. Loaded on every front-end page
 * after overrides.css; the profile rules build on inner.css variables.
 */

/* ── Letter avatar (header + profile) ─────────────────────────────────── */
.ak-avatar {
    --ak-av-hue: 14;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, hsl(var(--ak-av-hue), 70%, 58%), hsl(calc(var(--ak-av-hue) + 40), 70%, 42%));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
}

.acc-wrap .pathway .dropdown-menu .head a {
    color: inherit;
    text-decoration: none;
}

.acc-wrap .pathway .dropdown-menu .head span {
    display: block;
    font-size: .85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Sign in modal ────────────────────────────────────────────────────────
   styles.css paints an "ava.jpg" badge in the green header arc; the image
   is not shipped, so a user glyph stands in for it. */
.modal .modal-dialog .modal-content:not(.normal):after {
    content: "\f007";
    background: none;
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    font-size: 1.9rem;
    line-height: 2.3rem;
    text-align: center;
    color: #0c1116;
}

.modal#signin .form-control {
    font-size: 1rem;
}

/* ── Series page watchlist button (members) ───────────────────────────── */
.ak-series-actions .ak-watchlist-btn {
    border: 0;
}

.ak-series-actions .ak-watchlist-btn.marked {
    background: rgba(255, 255, 255, .2);
    color: var(--ak-secondary, #36cb68);
}

.ak-series-actions .ak-watchlist-btn:disabled {
    opacity: .6;
}

/* ── Profile ──────────────────────────────────────────────────────────── */
.ak-profile {
    max-width: 1600px;
}

/* Hero: blurred cover of the latest bookmark behind the identity row. */
.akp-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--ak-radius, 1.2rem);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(228, 95, 58, .28), transparent 55%),
        radial-gradient(90% 120% at 100% 100%, rgba(54, 203, 104, .14), transparent 60%),
        var(--ak-panel, #11161b);
    margin-bottom: 2rem;
}

.akp-hero-bg {
    position: absolute;
    inset: -2rem;
    background-size: cover;
    background-position: center 30%;
    filter: blur(24px) saturate(1.2);
    opacity: .35;
}

.akp-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 17, 22, .2), rgba(12, 17, 22, .92));
}

.akp-hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 2.6rem 2.4rem 1.6rem;
}

.akp-avatar {
    flex: 0 0 auto;
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 1.6rem;
    font-size: 2.8rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 255, 255, .12);
    transform: rotate(-4deg);
}

.akp-id {
    flex: 1 1 auto;
    min-width: 0;
}

.akp-kicker {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ak-primary, #e45f3a);
}

.akp-id h1 {
    margin: .2rem 0 .7rem;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 700;
    color: #fff;
    overflow-wrap: anywhere;
}

.akp-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.akp-facts span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .85rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .75);
    font-size: .9rem;
}

.akp-facts b {
    color: #fff;
}

.akp-signout {
    flex: 0 0 auto;
    align-self: flex-start;
}

/* Tabs sit along the bottom edge of the hero. */
.akp-tabs {
    position: relative;
    display: flex;
    justify-content: flex-start;
    gap: .4rem;
    padding: 0 2.4rem;
    border-top: 1px solid var(--ak-line, rgba(255, 255, 255, .06));
}

/* styles.css turns every "nav > a" into a square icon button. */
.akp-tabs a {
    position: relative;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: .5rem;
    width: auto;
    height: auto;
    padding: 1rem 1.1rem;
    background: none;
    border-radius: 0;
    color: var(--ak-muted, rgba(255, 255, 255, .5));
    font-weight: 600;
    text-decoration: none;
}

.akp-tabs a:hover {
    color: #fff;
    background: none;
}

.akp-tabs a.active {
    color: #fff;
}

.akp-tabs a.active::after {
    content: "";
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--ak-primary, #e45f3a);
}

.akp-count {
    min-width: 1.6rem;
    padding: .05rem .5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .1);
    font-size: .8rem;
    text-align: center;
}

.akp-tabs a.active .akp-count {
    background: var(--ak-primary, #e45f3a);
    color: #fff;
}

/* Buttons (series.css, which owns .ak-btn-ghost, is not loaded here). */
.akp-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.3rem;
    border: 0;
    border-radius: 2rem;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
}

.akp-btn:hover,
.akp-btn:focus-visible {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.akp-btn-primary {
    background: var(--ak-primary, #e45f3a);
}

.akp-btn-primary:hover,
.akp-btn-primary:focus-visible {
    background: #f0714d;
}

/* Overview: recent bookmarks + account column. */
.akp-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 2rem;
    align-items: start;
}

.akp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.akp-section-head h2,
.akp-card h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.akp-section-head a {
    color: var(--ak-muted, rgba(255, 255, 255, .5));
    font-size: .95rem;
    text-decoration: none;
}

.akp-section-head a:hover {
    color: var(--ak-primary, #e45f3a);
}

.akp-account {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.akp-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.6rem;
    border-radius: var(--ak-radius, 1.2rem);
    background: var(--ak-panel, #11161b);
    border: 1px solid var(--ak-line, rgba(255, 255, 255, .06));
}

.akp-card h2 i {
    margin-right: .4rem;
    color: var(--ak-primary, #e45f3a);
}

.akp-card label {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin: 0;
}

.akp-card label span {
    color: var(--ak-muted, rgba(255, 255, 255, .5));
    font-size: .85rem;
}

.akp-card .form-control:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.akp-card .alert {
    margin: 0;
    padding: .7rem 1rem;
    font-size: .9rem;
}

.akp-card .btn-primary {
    align-self: flex-start;
    padding: .6rem 1.4rem;
    border-radius: 2rem;
    font-weight: 600;
}

/* Watchlist cards: remove button over the poster. */
.akp-grid .aitem .inner {
    position: relative;
}

.akp-remove {
    position: absolute;
    top: 1.3rem;
    right: 1.3rem;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: rgba(12, 17, 22, .8);
    color: #fff;
    opacity: 0;
    transition: opacity .2s, background-color .2s;
    cursor: pointer;
}

.akp-grid .aitem:hover .akp-remove,
.akp-remove:focus-visible {
    opacity: 1;
}

.akp-remove:hover {
    background: #d33;
}

@media (hover: none) {
    .akp-remove {
        opacity: 1;
    }
}

.akp-empty {
    padding: 3rem 1.5rem;
    border: 1px dashed rgba(255, 255, 255, .12);
    border-radius: var(--ak-radius, 1.2rem);
    text-align: center;
    color: var(--ak-muted, rgba(255, 255, 255, .5));
}

.akp-empty[hidden] {
    display: none;
}

.akp-empty > i {
    display: block;
    margin-bottom: .8rem;
    font-size: 2.4rem;
    color: rgba(255, 255, 255, .25);
}

.akp-empty p {
    max-width: 30rem;
    margin: 0 auto 1.2rem;
}

/* Guest prompt. */
.akp-guest {
    max-width: 34rem;
    margin: 3rem auto;
    padding: 3rem 2rem;
    text-align: center;
}

.akp-guest > i {
    font-size: 2.6rem;
    color: var(--ak-primary, #e45f3a);
    margin-bottom: 1rem;
}

.akp-guest h1 {
    font-size: 1.6rem;
    color: #fff;
}

.akp-guest p {
    color: var(--ak-muted, rgba(255, 255, 255, .5));
}

.akp-guest-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .8rem;
    margin-top: 1.5rem;
}

@media (max-width: 1199.98px) {
    .akp-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .akp-hero-inner {
        flex-wrap: wrap;
        gap: 1.1rem;
        padding: 1.8rem 1.2rem 1.2rem;
    }

    .akp-avatar {
        width: 4.6rem;
        height: 4.6rem;
        border-radius: 1.2rem;
        font-size: 2rem;
    }

    .akp-id {
        flex-basis: calc(100% - 6rem);
    }

    .akp-id {
        padding-right: 3rem;
    }

    /* Icon-only sign out in the top corner. */
    .akp-signout {
        position: absolute;
        top: 1.2rem;
        right: 1.2rem;
        width: 2.6rem;
        height: 2.6rem;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .akp-signout i {
        font-size: 1rem;
    }

    .akp-tabs {
        padding: 0 .8rem;
    }

    .akp-card {
        padding: 1.2rem;
    }
}
