/* =========================================
   OFFBRAND — ACCOUNTS
   Nav button (every page) + the account page.
   Uses the site's colour variables, so it follows light/dark
   mode and the settings panel.
========================================= */

/* ---------- nav button ---------- */

.account-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 39px;
    padding: 0 16px;
    border: 1px solid var(--border, #303139);
    border-radius: 999px;
    color: var(--text, #f2f0ec);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: calc(1.5px * var(--ob-label-tracking, 1));
    white-space: nowrap;
    transition: var(--transition, 0.4s ease);
}

.account-link:hover,
.account-link.active {
    background: var(--surface-light, #24252c);
    border-color: var(--accent, #b65b55);
}

.account-link:focus-visible {
    outline: 2px solid var(--accent-light, #d27b72);
    outline-offset: 3px;
}

.account-link:has(.account-avatar) {
    padding: 0 14px 0 4px;
}

.account-avatar {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: var(--accent, #b65b55);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.account-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0;
    font-size: 13px;
}

/* film page top bar */
.film-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.film-topbar-actions .account-link {
    height: 43px;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(20, 20, 24, 0.35);
    backdrop-filter: blur(12px);
    color: #fff;
}

.film-topbar-actions .account-link:hover {
    background: var(--accent, #b65b55);
    border-color: var(--accent, #b65b55);
}

/* the person icon is only used on small screens */
.account-icon {
    display: none;
}

.account-link {
    position: relative;
}

.account-link.needs-setup::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 9px;
    height: 9px;
    background: var(--accent-light, #d27b72);
    border: 2px solid var(--nav-background, #111216);
    border-radius: 50%;
}

@media (max-width: 900px) {

    /* tidy round button, same size as the light/dark button beside it */
    .nav-actions {
        gap: 8px;
    }

    .account-link {
        justify-content: center;
        width: 39px;
        padding: 0;
        gap: 0;
    }

    .account-link:has(.account-avatar) {
        padding: 0;
    }

    .account-label,
    .account-name {
        display: none;
    }

    .account-icon {
        display: block;
        width: 19px;
        height: 19px;
    }

    .account-link .account-avatar {
        width: 31px;
        height: 31px;
    }

    .film-topbar-actions {
        gap: 8px;
    }

    .film-topbar-actions .account-link {
        width: 43px;
    }

}


/* ---------- account page ---------- */

.account-page {
    min-height: 100vh;
    padding-top: 170px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.account-shell {
    width: min(520px, 100%);
}

.account-card {
    padding: 45px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.account-card[hidden],
.account-step[hidden],
.account-page [hidden] {
    display: none !important;
}

.account-title {
    margin: 14px 0 22px;
    font-size: calc(clamp(34px, 6vw, 50px) * var(--ob-display-scale, 1));
    letter-spacing: calc(-2px * var(--ob-tracking, 1));
    line-height: 1.02;
}

.account-muted {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.account-card > .account-muted + .account-form,
.account-step .account-muted + .form-field {
    margin-top: 28px;
}

.account-form {
    display: grid;
    gap: 22px;
}

.account-hint {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.account-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.account-tabs button {
    padding: 14px 10px;
    background: none;
    border: 0;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: calc(2px * var(--ob-label-tracking, 1));
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.account-tabs button[aria-selected="true"] {
    background: var(--accent);
    color: #fff;
}

.account-tabs button:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: -4px;
}

.account-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 18px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 5px;
    color: #202124;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.account-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.account-google:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

.account-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: calc(1.5px * var(--ob-label-tracking, 1));
    text-transform: uppercase;
}

.account-divider::before,
.account-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.account-form .button,
.account-actions .button {
    cursor: pointer;
}

.account-form .button:disabled,
.account-actions .button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.account-form .button b,
.account-actions .button b {
    font-weight: 700;
}

.account-link-button {
    justify-self: start;
    padding: 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.account-link-button:hover {
    color: var(--text);
}

.account-card > .account-link-button {
    margin-top: 24px;
}

.account-captcha:empty {
    display: none;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
}

.account-form .account-actions {
    margin-top: 0;
    justify-content: flex-start;
}

/* ---------- set-up steps ---------- */

.account-progress {
    display: flex;
    gap: 6px;
    margin: 16px 0 26px;
}

.account-progress span {
    flex: 1;
    height: 3px;
    background: var(--border);
    transition: background 0.4s ease;
}

.account-progress span.on {
    background: var(--accent);
}

.account-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.account-form .account-swatches {
    margin: 0;
}

.account-swatch {
    width: 38px;
    height: 38px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-swatch:hover {
    transform: scale(1.1);
}

.account-swatch[aria-checked="true"] {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
}

.account-swatch:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 4px;
}

.account-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 22px 0;
}

.account-preview strong {
    display: block;
    font-size: 17px;
}

.account-avatar-large {
    width: 54px;
    height: 54px;
    font-size: 22px;
}

.account-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
}

.account-check input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}

/* ---------- your account ---------- */

.account-danger {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.account-danger h2 {
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: calc(2.5px * var(--ob-label-tracking, 1));
}

.account-danger-button {
    margin-top: 16px;
    padding: 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--accent);
    color: var(--accent-light);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.account-danger-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

@media (max-width: 700px) {

    .account-page {
        padding-top: 130px;
    }

    .account-card {
        padding: 30px 22px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .account-google,
    .account-swatch,
    .account-progress span {
        transition: none;
    }

}


/* ---------- buttons (real <button>s need their browser grey removed) ---------- */

.account-card .button {
    font-family: inherit;
    border: 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.account-card .button-primary {
    background: var(--accent);
    color: #fff;
}

.account-card .button-primary:hover:not(:disabled) {
    background: var(--accent-light);
}

.account-card .button-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.account-card .button-outline:hover:not(:disabled) {
    background: var(--surface-light);
    border-color: var(--accent);
}

.account-card .button:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

/* ---------- Save Changes: dull when nothing to save, lit when there is ---------- */

.account-form #pfSave.is-clean {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    opacity: 1;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.account-form #pfSave.is-clean span {
    opacity: 0.35;
    transform: none;
}

.account-form #pfSave.is-dirty {
    background: var(--accent);
    color: #fff;
    opacity: 1;
    animation: pfPulse 2s ease-in-out infinite;
}

@keyframes pfPulse {

    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5);
    }

    50% {
        box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0);
    }

}

#pfStatus {
    color: var(--accent-light);
}

#pfStatus.is-error {
    color: #e0706a;
}

#pfStatus.is-success {
    color: #6fb98a;
}

/* ---------- "coming soon" notice ---------- */

.account-soon {
    padding: 22px 24px;
    background: var(--surface-light, rgba(255, 255, 255, 0.04));
    border: 1px dashed var(--border);
    text-align: center;
}

.account-soon strong {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: calc(2px * var(--ob-label-tracking, 1));
}

.account-soon p {
    color: var(--muted);
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {

    .account-form #pfSave.is-dirty {
        animation: none;
    }

}


/* =========================================
   ACCOUNT PAGE: lists, reviews, data
========================================= */

.account-shell {
    transition: width 0.3s ease;
}

.account-shell.is-wide {
    width: min(760px, 100%);
}

.account-section {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.account-section h2 {
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: calc(2.5px * var(--ob-label-tracking, 1));
}

.account-section .button {
    margin-top: 16px;
}

#pfSyncStatus {
    color: var(--accent-light);
}

.account-list {
    margin-top: 18px;
}

.account-list h3 {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: calc(2px * var(--ob-label-tracking, 1));
}

.account-films {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-film {
    display: flex;
    align-items: center;
    background: var(--surface-light);
    border: 1px solid var(--border);
}

.account-film-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    color: var(--text);
    font-size: 13px;
}

.account-film-link img {
    width: 34px;
    height: 34px;
    object-fit: cover;
}

.account-film-remove {
    padding: 0 12px;
    align-self: stretch;
    background: none;
    border: 0;
    border-left: 1px solid var(--border);
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
}

.account-film-remove:hover {
    color: var(--accent-light);
}

.account-reviews {
    display: grid;
    gap: 14px;
    list-style: none;
}

.account-review {
    padding: 18px 20px;
    background: var(--surface-light);
    border: 1px solid var(--border);
}

.account-review-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.account-review-head a {
    color: var(--text);
    font-weight: 700;
}

.account-review-stars {
    color: var(--accent-light);
    letter-spacing: 2px;
    font-size: 13px;
}

.account-review-meta {
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: calc(1px * var(--ob-label-tracking, 1));
    text-transform: uppercase;
}

.account-review-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.account-review .review-actions {
    margin-top: 12px;
}

.account-review a.review-action {
    display: inline-block;
}

/* ---------- film page: watchlist / seen / favourite ---------- */

.film-list-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.film-list-actions:empty {
    display: none;
}

.film-list-button {
    padding: 10px 18px;
    background: rgba(20, 20, 24, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.film-list-button:hover:not(:disabled) {
    border-color: var(--accent, #b65b55);
}

.film-list-button.is-on {
    background: var(--accent, #b65b55);
    border-color: var(--accent, #b65b55);
}

.film-list-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.film-list-button:focus-visible {
    outline: 2px solid var(--accent-light, #d27b72);
    outline-offset: 3px;
}

.film-list-message {
    flex-basis: 100%;
    color: #fff;
    font-size: 12px;
}


/* ---------- My reviews buttons (reviews.css isn't loaded on this page) ---------- */

.account-review .review-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.account-review .review-action {
    display: inline-block;
    padding: 9px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: calc(1.5px * var(--ob-label-tracking, 1));
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.account-review .review-action:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--surface);
}

.account-review .review-action:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

.account-review .review-delete {
    color: var(--accent-light);
}

.account-review .review-delete:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.account-review .review-action:disabled {
    opacity: 0.6;
    cursor: wait;
}


/* ---------- film hero: room between the little buttons and WATCH FILM ---------- */

.film-hero-content:has(.film-rating-line:not(:empty), .film-list-actions:not(:empty)) .film-watch-button {
    margin-top: 34px;
}


/* ---------- long words must never push the page wider ---------- */

.account-reviews > li,
.account-films,
.account-film,
.account-list {
    min-width: 0;
}

.account-review-text,
.account-review-head a,
.account-film-link span {
    overflow-wrap: anywhere;
}

/* ---------- bigger tap area for the little text buttons ---------- */

.review-actions .review-action {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
}

.account-review .review-action {
    min-height: 38px;
}
