/* ==========================================================================
   Vid2Porn — Members module (sign-in dialog, header account links, profile)
   Logical properties only (RTL-safe). Uses the theme tokens from base.css.
   ========================================================================== */

/* Header account links */
.tt-members { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.tt-nav .tt-members__btn { min-height: 38px; padding: 0 16px; border: 1px solid var(--tt-border-strong); color: var(--tt-text); background: transparent; white-space: nowrap; }
.tt-nav .tt-members__btn:hover { background: var(--tt-hover); }
.tt-nav .tt-members__btn--primary { border-color: transparent; background: var(--tt-accent-strong); color: var(--tt-on-accent); }
.tt-nav .tt-members__btn--primary:hover { background: var(--tt-accent-hover); }
.tt-nav .tt-members__btn--ghost { border-color: transparent; color: var(--tt-muted); }

/* Dialog */
.tt-auth { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--tt-border); border-radius: var(--tt-radius); background: var(--tt-surface); color: var(--tt-text); box-shadow: var(--tt-shadow-lg); overflow: auto; }
.tt-auth::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.tt-auth__box { position: relative; padding: 28px 26px 22px; }
.tt-auth__close { position: absolute; inset-block-start: 10px; inset-inline-end: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--tt-muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tt-auth__close:hover { background: var(--tt-hover); color: var(--tt-text); }
.tt-auth__title { margin: 0 0 16px; padding-inline-end: 32px; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.tt-auth__hint { margin: 0 0 12px; color: var(--tt-muted); font-size: .92rem; }
.tt-auth__form, .tt-profile-form { display: grid; gap: 8px; }
.tt-auth__form label, .tt-profile-form label { font-weight: 700; font-size: .92rem; }
.tt-auth__form input:not([type="checkbox"]), .tt-profile-form input, .tt-profile-form textarea { width: 100%; min-width: 0; padding: 11px 14px; color: var(--tt-text); background: var(--tt-surface-2); border: 1px solid transparent; border-radius: var(--tt-radius-sm); font: inherit; transition: border-color var(--tt-fast) ease, background-color var(--tt-fast) ease; }
.tt-auth__form input:focus, .tt-profile-form input:focus, .tt-profile-form textarea:focus { border-color: var(--tt-accent); background: var(--tt-surface); outline: none; }
.tt-auth__check { display: flex; align-items: center; gap: 8px; font-weight: 500 !important; }
.tt-auth__submit { margin-block-start: 6px; padding: 12px 22px; border: 0; border-radius: var(--tt-radius-sm); background: var(--tt-accent-strong); color: var(--tt-on-accent); font: inherit; font-weight: 700; cursor: pointer; transition: background-color var(--tt-fast) ease; }
.tt-auth__submit:hover { background: var(--tt-accent-hover); }
.tt-auth__submit[disabled] { opacity: .6; cursor: progress; }
.tt-auth__msg { margin: 0; padding: 10px 12px; border-radius: var(--tt-radius-sm); background: var(--tt-surface-2); border-inline-start: 4px solid var(--tt-danger); font-size: .92rem; }
.tt-auth__msg.is-success { border-inline-start-color: var(--tt-success); }
.tt-auth__links { margin: 16px 0 0; color: var(--tt-muted); font-size: .92rem; }
.tt-auth__links a { color: var(--tt-accent); font-weight: 600; }
/* Honeypot: off-screen, not display:none, so simple bots still fill it. */
.tt-auth__legal { margin: 4px 0 0; color: var(--tt-muted); font-size: .82rem; line-height: 1.5; }
.tt-auth__legal a { color: var(--tt-accent); text-decoration: underline; }
.tt-pass { display: grid; gap: 6px; margin-block-end: 4px; }
.tt-pass__bar { height: 5px; border-radius: 3px; background: var(--tt-surface-2); overflow: hidden; }
.tt-pass__bar span { display: block; width: 0; height: 100%; background: var(--tt-danger); transition: width var(--tt-fast) ease, background-color var(--tt-fast) ease; }
.tt-pass[data-score="2"] .tt-pass__bar span { background: #e0a100; }
.tt-pass[data-score="3"] .tt-pass__bar span { background: #8cbf26; }
.tt-pass[data-score="4"] .tt-pass__bar span { background: var(--tt-success); }
.tt-pass__label { margin: 0; color: var(--tt-muted); font-size: .85rem; }
.tt-pass__rules { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: .82rem; color: var(--tt-muted); }
.tt-pass__rules li::before { content: "○"; display: inline-block; width: 1.4em; }
.tt-pass__rules li.is-ok { color: var(--tt-success); }
.tt-pass__rules li.is-ok::before { content: "✓"; }
.tt-pass__rules li.is-bonus { opacity: .8; }
.tt-captcha { display: flex; align-items: center; gap: 8px; }
.tt-captcha__img { display: block; max-width: calc(100% - 48px); height: auto; border-radius: var(--tt-radius-sm); background: #f2f2f6; }
.tt-captcha__q { font-size: 1.3rem; letter-spacing: .05em; }
.tt-captcha__refresh { flex: none; width: 40px; height: 40px; border: 0; border-radius: var(--tt-radius-sm); background: var(--tt-surface-2); color: var(--tt-text); font-size: 1.2rem; cursor: pointer; }
.tt-captcha__refresh:hover { background: var(--tt-hover); }
.tt-auth__hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Profile + author pages */
.tt-head--author { gap: 16px 20px; }
.tt-head--author .tt-head__desc { flex-basis: auto; }
.tt-head__action { margin-inline-start: auto; }
.tt-profile__cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--tt-gap); align-items: start; }
.tt-profile__card { padding: 24px; background: var(--tt-surface); border: 1px solid var(--tt-border); border-radius: var(--tt-radius); box-shadow: var(--tt-shadow-sm); }
.tt-profile__card h2 { margin: 0 0 16px; font-size: 1.15rem; font-weight: 800; }
.tt-profile-form__pass { display: grid; gap: 8px; margin: 12px 0; padding: 14px; border: 1px solid var(--tt-border); border-radius: var(--tt-radius-sm); }
.tt-profile-form__preferences { display: grid; gap: 8px; margin: 12px 0; padding: 14px; border: 1px solid var(--tt-border); border-radius: var(--tt-radius-sm); background: var(--tt-surface-2); }
.tt-profile-form__preferences legend { padding-inline: 6px; font-weight: 700; }
.tt-profile-form__preferences .tt-auth__check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.tt-profile-form__preferences input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--tt-accent); }
.tt-profile-form__preferences .tt-auth__hint { margin: 0; }
.tt-profile-form__pass input { box-sizing: border-box; }
.tt-profile__card { min-width: 0; }
.tt-profile-form { gap: 10px; }
.tt-profile-form > label { margin-block-start: 4px; }
.tt-profile-form textarea { min-height: 104px; resize: vertical; }
.tt-profile__logout a { display: inline-flex; align-items: center; padding: 9px 14px; border: 1px solid var(--tt-border); border-radius: var(--tt-radius-sm); text-decoration: none; }
.tt-profile__logout a:hover { color: var(--tt-text); background: var(--tt-hover); }
.tt-profile-form__pass legend { padding-inline: 6px; font-weight: 700; }
.tt-profile-form .tt-submit-button { justify-self: start; margin-block-start: 6px; }
.tt-profile-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tt-profile-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-block-end: 1px solid var(--tt-border); }
.tt-profile-list li:last-child { border-block-end: 0; }
.tt-profile-list a { color: var(--tt-text); font-weight: 600; }
.tt-profile-list a:hover { color: var(--tt-accent); }
.tt-badge { padding: 3px 10px; border-radius: var(--tt-radius-pill); background: var(--tt-surface-2); color: var(--tt-muted); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.tt-badge--publish { background: rgba(52, 211, 153, .16); color: var(--tt-success); }
.tt-badge--pending { background: var(--tt-accent-soft); color: var(--tt-accent); }

/* Libraries below the two columns */
.tt-profile__lib { margin-block-start: 36px; }
.tt-profile__lib h2 { margin: 0 0 16px; font-size: 1.15rem; font-weight: 800; }
.tt-profile__logout { margin-block-start: 28px; }
.tt-profile__logout a { color: var(--tt-muted); }

@media (max-width: 860px) {
	.tt-profile__cols { grid-template-columns: 1fr; }
}
@media (max-width: 782px) {
	.tt-members { flex-direction: column; align-items: stretch; margin-inline-start: 0; padding-block: 6px; }
	.tt-nav .tt-members__btn { justify-content: center; min-height: 46px; }
	.tt-auth__box { padding: 22px 18px 18px; }
}
@media (prefers-reduced-motion: no-preference) {
	.tt-auth[open] { animation: tt-drop var(--tt-base) var(--tt-ease); }
}
