/* ACCESS: доступ к тайтлам — страницы-барьеры (views/access/gate.php), метки на обложках, настройки тайтла и админка /admin/access */

/* ---------- страница-барьер ---------- */
.ta-gate {
	max-width: 560px; margin: clamp(20px, 6vh, 64px) auto clamp(28px, 8vh, 80px); padding: 30px 28px 24px; text-align: center;
	border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card-solid);
	box-shadow: var(--elev-2, 0 8px 30px oklch(0 0 0 / .12));
}
.ta-gate-art { position: relative; width: 104px; height: 104px; margin: 0 auto 16px; display: grid; place-items: center; }
.ta-gate-ring {
	position: absolute; inset: 0; border-radius: 50%;
	background: radial-gradient(closest-side, color-mix(in oklab, var(--primary) 26%, transparent), transparent);
}
.ta-gate-ico {
	position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
	color: var(--primary); background: color-mix(in oklab, var(--primary) 14%, var(--card-solid));
	border: 1px solid color-mix(in oklab, var(--primary) 35%, var(--border));
}
.ta-gate-ico b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ta-gate.is-adult .ta-gate-ring { background: radial-gradient(closest-side, color-mix(in oklab, var(--destructive) 26%, transparent), transparent); }
.ta-gate.is-adult .ta-gate-ico { color: var(--destructive); background: color-mix(in oklab, var(--destructive) 12%, var(--card-solid)); border-color: color-mix(in oklab, var(--destructive) 40%, var(--border)); }
.ta-gate.is-geo .ta-gate-ring { background: radial-gradient(closest-side, color-mix(in oklab, var(--warning) 30%, transparent), transparent); }
.ta-gate.is-geo .ta-gate-ico { color: var(--rating-text, var(--warning)); background: color-mix(in oklab, var(--warning) 16%, var(--card-solid)); border-color: color-mix(in oklab, var(--warning) 45%, var(--border)); }
.ta-gate .nb-eyebrow { margin: 0 0 6px; }
.ta-gate h1 { margin: 0 0 10px; font-family: var(--font-serif); font-size: clamp(22px, 4vw, 28px); font-weight: 600; line-height: 1.2; }
.ta-gate-lead { margin: 0 auto 18px; max-width: 46ch; color: var(--muted-foreground); font-size: 15px; line-height: 1.55; }
.ta-gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ta-gate-actions .nb-btn-lg { min-width: min(100%, 220px); justify-content: center; }
.ta-gate-confirm { display: contents; }
.ta-gate-note { margin: 16px auto 0; max-width: 50ch; font-size: 13px; line-height: 1.5; color: var(--muted-foreground); }
.ta-gate-meta { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); }
@media (max-width: 560px) {
	.ta-gate { margin: 14px 0 24px; padding: 24px 16px 18px; }
	.ta-gate-actions { flex-direction: column; align-items: stretch; }
	.ta-gate-actions .nb-btn { justify-content: center; }
}

/* ---------- гостевой лимит в читалке (карточка в стиле .nb-paywall из coins.css) ---------- */
.nb-paywall.is-guest-limit .nb-paywall-lock { color: var(--primary); background: color-mix(in oklab, var(--primary) 16%, transparent); }

/* ---------- метки на обложках (views/book/_cover.php) ---------- */
.nb-cover .ta-badges { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; z-index: 2; pointer-events: auto; }
.ta-b {
	display: inline-flex; align-items: center; gap: 3px; min-height: 20px; padding: 1px 6px; border-radius: var(--radius-pill);
	font: 700 11px/1.3 var(--font-sans); font-style: normal; letter-spacing: .01em; color: #fff;
	background: oklch(0.25 0.02 260 / .78); box-shadow: 0 1px 3px oklch(0 0 0 / .3); backdrop-filter: blur(4px);
}
.ta-b svg { width: 11px; height: 11px; }
.ta-b-adult { background: oklch(0.55 0.2 25 / .92); }
.ta-b-hidden { background: oklch(0.5 0.14 250 / .9); }
.ta-b-geo { background: oklch(0.62 0.15 70 / .94); color: oklch(0.2 0.03 70); }

/* ---------- чипы на странице тайтла и в списках ---------- */
.ta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.ta-chip { display: inline-flex; align-items: center; gap: 4px; }
.ta-chip svg { width: 12px; height: 12px; }

/* ---------- настройки тайтла «Доступ и видимость» ---------- */
.ta-set { display: grid; gap: 18px; }
.ta-set .ta-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card-solid); cursor: pointer; }
.ta-set .ta-toggle input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); }
.ta-set .ta-toggle b { font-size: 15px; }
.ta-set .ta-toggle span { grid-column: 2; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.5; }
.ta-set .ta-toggle.is-disabled { opacity: .7; cursor: not-allowed; }
.ta-geo { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card-solid); }
.ta-geo h3 { margin: 0; font-size: 15px; }
.ta-geo .hint { margin: 0; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.5; }
.ta-sel { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.ta-sel:empty::before { content: attr(data-empty); color: var(--muted-foreground); font-size: 13px; align-self: center; }
.ta-sel .ta-cc { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border-radius: var(--radius-pill); border: 1px solid color-mix(in oklab, var(--warning) 45%, var(--border)); background: color-mix(in oklab, var(--warning) 12%, var(--card-solid)); font-size: 13px; }
.ta-sel .ta-cc code { font-weight: 700; font-size: 12px; }
.ta-sel .ta-cc button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--muted-foreground); cursor: pointer; }
.ta-sel .ta-cc button:hover { background: var(--muted); color: var(--foreground); }
.ta-find { position: relative; }
.ta-find input[type=search] { width: 100%; }
.ta-list { max-height: 264px; overflow: auto; margin: 6px 0 0; padding: 4px; list-style: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--popover, var(--card-solid)); }
.ta-list li { margin: 0; }
.ta-list label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.ta-list label:hover { background: var(--muted); }
.ta-list label code { min-width: 26px; font-size: 12px; font-weight: 700; color: var(--muted-foreground); }
.ta-list .flag { width: 1.4em; text-align: center; }
.ta-list li[hidden] { display: none; }
.ta-readonly { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- админка /admin/access ---------- */
.ta-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.ta-admin-grid .field input[type=number], .ta-admin-grid .field input[type=text] { width: 100%; }
.ta-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.ta-status .nb-admin-stat b { font-size: 20px; word-break: break-word; }
.ta-status .nb-admin-stat .sub { word-break: break-all; }
.ta-test { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ta-test input { flex: 1 1 200px; min-width: 0; }
.ta-test-out { margin: 8px 0 0; font-size: 14px; }
.ta-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.ta-titles td .nb-chip { margin: 1px 2px; }
