/*
Theme Name: Watch It
Theme URI: https://example.com/watch-it
Author: Your Studio
Author URI: https://example.com
Description: A premium, dark, image-heavy content discovery theme for modern media platforms. Compact navigation, dense card grids, portrait & video content layouts, fully customizable from the WordPress Customizer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: watch-it
Tags: dark, one-column, two-columns, grid-layout, custom-logo, custom-menu, custom-colors, featured-images, full-width-template, sticky-post, threaded-comments, translation-ready

Watch It WordPress Theme, (C) Your Studio
Watch It is distributed under the terms of the GNU GPL v2 or later.
*/

/* ==========================================================================
   1. RESET
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body,h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd,ul,ol {
	margin: 0;
	padding: 0;
}

ul, ol { list-style: none; }

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
/* Raw pasted <iframe> embeds (video players, maps, etc.) aren't covered
   by the rule above and keep their fixed width/height attributes
   otherwise — on a movie/video site that's the single biggest cause of a
   post page rendering wider than the phone's screen. */
iframe, embed, object { max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; }

a { color: inherit; text-decoration: none; }

body {
	overflow-x: hidden;
	width: 100%;
}

/* ==========================================================================
   2. VARIABLES
   ========================================================================== */
:root {
	/* Backgrounds */
	--wi-bg: #000000;
	--wi-bg-alt: #090909;
	--wi-surface: #101010;
	--wi-surface-alt: #151515;
	--wi-header-bg: #060606;

	/* Text */
	--wi-text: #ffffff;
	--wi-text-secondary: #b8b8b8;
	--wi-text-muted: #707070;

	/* Accents (overridable from Customizer) */
	--wi-accent: #ff2f86;
	--wi-accent-rgb: 255, 47, 134;
	--wi-accent-secondary: #f5c400;
	--wi-accent-secondary-rgb: 245, 196, 0;

	/* Borders */
	--wi-border: rgba(255, 255, 255, 0.08);
	--wi-border-strong: #2a2a2a;
	--wi-border-gold: rgba(var(--wi-accent-secondary-rgb), 0.4);

	/* Radius */
	--wi-radius-card: 10px;
	--wi-radius-btn: 7px;
	--wi-radius-pill: 999px;
	--wi-radius-video: 4px;
	--wi-radius-cta: 8px;

	/* Layout */
	--wi-container-max: 1320px;
	--wi-container-pad: 20px;
	--wi-header-height: 46px;
	--wi-gap-card: 11px;
	--wi-section-gap: 24px;

	/* Grid columns (overridable) */
	--wi-cols-portrait: 5;
	--wi-cols-video: 4;

	/* Motion */
	--wi-transition: 180ms ease;

	/* Type */
	--wi-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Text drawn directly over photo cards — always light, regardless of
	   site theme, since it sits on a dark image + gradient in both modes. */
	--wi-oncard-text: #ffffff;
	--wi-oncard-text-secondary: #d8d8d8;
}

:root[data-theme="light"] {
	--wi-bg: #f4f4f5;
	--wi-bg-alt: #ffffff;
	--wi-surface: #ffffff;
	--wi-surface-alt: #f0f0f1;
	--wi-header-bg: #ffffff;
	--wi-text: #121214;
	--wi-text-secondary: #4a4a4d;
	--wi-text-muted: #8a8a8e;
	--wi-border: rgba(0, 0, 0, 0.08);
	--wi-border-strong: #dcdce0;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
body {
	font-family: var(--wi-font);
	background: var(--wi-bg);
	color: var(--wi-text);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0,0,0,0);
	border: 0;
	white-space: nowrap;
}

/* ==========================================================================
   4. GLOBAL LAYOUT
   ========================================================================== */
.wi-container {
	max-width: var(--wi-container-max);
	margin: 0 auto;
	padding-left: var(--wi-container-pad);
	padding-right: var(--wi-container-pad);
	width: 100%;
}

.wi-site { display: flex; flex-direction: column; min-height: 100vh; }
.wi-main { flex: 1 0 auto; }

.wi-icon { width: 14px; height: 14px; flex-shrink: 0; fill: currentColor; }
.wi-icon--sm { width: 12px; height: 12px; }

.wi-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}
.wi-layout.has-sidebar {
	grid-template-columns: minmax(0, 1fr) 280px;
}
@media (max-width: 991px) {
	.wi-layout.has-sidebar { grid-template-columns: 1fr; }
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */
.wi-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wi-header-bg);
	border-bottom: 1px solid var(--wi-border);
	height: var(--wi-header-height);
}
.wi-header__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	gap: 18px;
}
.wi-header__logo { margin-right: 4px; flex-shrink: 0; }
.wi-header__nav { flex: 1; min-width: 0; }
.wi-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
/* ==========================================================================
   6. LOGO
   ========================================================================== */
.wi-logo {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 17px;
	font-weight: 800;
	color: var(--wi-text);
	letter-spacing: -0.02em;
	line-height: 1;
}
.wi-logo img { height: 20px; width: auto; }
.wi-logo__icon { color: var(--wi-accent); }
.wi-logo__accent { color: var(--wi-accent); }

/* ==========================================================================
   6b. NAVIGATION
   ========================================================================== */
.wi-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}
.wi-nav__list::-webkit-scrollbar { display: none; }

.wi-nav__list a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 10px;
	border-radius: var(--wi-radius-pill);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wi-text-secondary);
	white-space: nowrap;
	transition: background var(--wi-transition), color var(--wi-transition);
}
.wi-nav__list a:hover,
.wi-nav__list a:focus-visible {
	color: var(--wi-text);
	background: rgba(255, 255, 255, 0.06);
}
.wi-nav__list li.current-menu-item > a,
.wi-nav__list li.current_page_item > a {
	background: rgba(var(--wi-accent-rgb), 0.16);
	color: var(--wi-accent);
}

/* ==========================================================================
   7. SEARCH
   ========================================================================== */
.wi-search {
	position: relative;
	display: flex;
	align-items: center;
}
.wi-search input[type="search"] {
	width: 170px;
	height: 30px;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border-strong);
	border-radius: var(--wi-radius-pill);
	padding: 0 12px 0 30px;
	font-size: 13px;
	color: var(--wi-text);
	transition: border-color var(--wi-transition), box-shadow var(--wi-transition);
}
.wi-search input[type="search"]::placeholder { color: var(--wi-text-muted); }
.wi-search input[type="search"]:focus {
	outline: none;
	border-color: var(--wi-accent);
	box-shadow: 0 0 0 3px rgba(var(--wi-accent-rgb), 0.18);
}
.wi-search__icon {
	position: absolute;
	left: 10px;
	color: var(--wi-text-muted);
	pointer-events: none;
}
.wi-search__submit {
	position: absolute;
	right: 0;
	width: 30px;
	height: 30px;
	opacity: 0;
}

/* ==========================================================================
   8. HEADER ACTION BUTTONS
   ========================================================================== */
.wi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 32px;
	padding: 0 14px;
	border-radius: var(--wi-radius-btn);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	border: 1px solid transparent;
	transition: background var(--wi-transition), border-color var(--wi-transition), color var(--wi-transition), transform var(--wi-transition);
}
.wi-btn:active { transform: scale(0.97); }

.wi-btn--primary { background: var(--wi-accent); color: #fff; border-radius: var(--wi-radius-pill); }
.wi-btn--primary:hover { filter: brightness(1.08); }

.wi-btn--outline { background: transparent; border-color: var(--wi-border-strong); color: var(--wi-text-secondary); }
.wi-btn--outline:hover { border-color: var(--wi-text-secondary); color: var(--wi-text); }

.wi-btn--premium {
	background: var(--wi-surface);
	border-color: var(--wi-border-gold);
	color: var(--wi-accent-secondary);
	border-radius: var(--wi-radius-pill);
}
.wi-btn--premium:hover { background: rgba(var(--wi-accent-secondary-rgb), 0.1); }

.wi-btn--telegram {
	background: var(--wi-surface);
	border-color: rgba(34, 158, 217, 0.4);
	color: #229ed9;
	border-radius: var(--wi-radius-pill);
}
.wi-btn--telegram:hover { background: rgba(34, 158, 217, 0.1); }

.wi-btn--accent-outline {
	background: transparent;
	border-color: var(--wi-accent);
	color: var(--wi-accent);
	border-radius: var(--wi-radius-pill);
	height: 28px;
	padding: 0 11px;
	font-size: 12.5px;
}
.wi-btn--accent-outline:hover { background: rgba(var(--wi-accent-rgb), 0.12); }

.wi-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: var(--wi-text-secondary);
	background: transparent;
	border: 1px solid transparent;
	transition: background var(--wi-transition), color var(--wi-transition);
}
.wi-icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--wi-text); }

/* ==========================================================================
   9-10. MOBILE HEADER + MENU
   ========================================================================== */
/*
 * The drawer opens as a bottom sheet (matching movie-hub's own mobile
 * "More" drawer) — it's only ever triggered from the bottom tab bar's
 * Menu button, which only exists on mobile, so this doesn't need a
 * separate mobile-only override.
 */
.wi-drawer {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	width: 100%;
	max-height: 80vh;
	background: var(--wi-bg-alt);
	border-top: 1px solid var(--wi-border);
	border-radius: 16px 16px 0 0;
	z-index: 210;
	transform: translateY(100%);
	transition: transform 260ms ease;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.wi-drawer.is-open { transform: translateY(0); }
.wi-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.wi-drawer__account {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--wi-border);
}
.wi-drawer__account .wi-btn img { border-radius: 50%; margin-right: 2px; }

.wi-drawer__nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--wi-text-secondary);
	border-bottom: 1px solid var(--wi-border);
}
.wi-drawer__nav li.current-menu-item > a { color: var(--wi-accent); }

.wi-drawer__divider {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wi-text-muted);
}
.wi-drawer__divider::after { content: ""; flex: 1; height: 1px; background: var(--wi-border); }

.wi-drawer__theme-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
	padding: 10px 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wi-text-secondary);
}
.wi-drawer__theme-toggle {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border-strong);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--wi-text);
}

.wi-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.6);
	z-index: 200;
	opacity: 0;
	pointer-events: none;
	transition: opacity 260ms ease;
}
.wi-overlay.is-open { opacity: 1; pointer-events: auto; }

/*
 * Fixed bottom tab bar — replaces the old hamburger + inline mobile
 * search bar entirely on mobile, matching movie-hub's mobile-tabbar
 * (Home/Trending/Categories/Search/Menu). Hidden by default; shown only
 * within the mobile media query below.
 */
.wi-tabbar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 190;
	align-items: center;
	justify-content: space-around;
	padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
	background: rgba(9, 9, 9, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-top: 1px solid var(--wi-border);
}
:root[data-theme="light"] .wi-tabbar { background: rgba(255, 255, 255, 0.92); }
.wi-tab-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	flex: 1;
	padding: 6px 4px;
	border-radius: 8px;
	font-size: 10px;
	font-weight: 700;
	color: var(--wi-text-muted);
	background: none;
	border: none;
	cursor: pointer;
	transition: color var(--wi-transition);
}
.wi-tab-item svg { width: 20px; height: 20px; }
.wi-tab-item.is-active,
.wi-tab-item[aria-expanded="true"] { color: var(--wi-accent); }

body.wi-menu-open { overflow: hidden; }

/* ==========================================================================
   11-12. SECTIONS
   ========================================================================== */
.wi-section { margin-top: var(--wi-section-gap); }
.wi-page-top { padding-top: 20px; }

.wi-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.wi-section-header__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 800;
	color: var(--wi-text);
	letter-spacing: -0.01em;
}
.wi-section-header__title .wi-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wi-accent);
	flex-shrink: 0;
}

/* ==========================================================================
   13-19. PORTRAIT CARD GRID
   ========================================================================== */
.wi-grid--portrait {
	display: grid;
	grid-template-columns: repeat(var(--wi-cols-portrait), minmax(0, 1fr));
	gap: var(--wi-gap-card);
}

/* Fixed 4-column grid for sections that always show exactly 4 items
   (e.g. Related Posts) — independent of the site-wide, customizable
   portrait column count, so 4 posts never leave an empty trailing gap. */
.wi-grid--portrait-4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wi-gap-card);
}
@media (max-width: 991px) {
	.wi-grid--portrait-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.wi-grid--portrait-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.wi-card {
	position: relative;
	display: block;
	border-radius: var(--wi-radius-card);
	overflow: hidden;
	aspect-ratio: 0.68 / 1;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	transition: border-color var(--wi-transition);
}
.wi-card--gold { border-color: var(--wi-border-gold); }
.wi-card:hover, .wi-card:focus-visible { border-color: rgba(var(--wi-accent-rgb), 0.5); }

.wi-card__img-wrap { position: absolute; inset: 0; overflow: hidden; }
.wi-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
}
.wi-card:hover .wi-card__img,
.wi-card:focus-visible .wi-card__img { transform: scale(1.035); }

.wi-card__gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,0) 45%, rgba(0,0,0,0.85) 100%);
	pointer-events: none;
}

.wi-badge {
	position: absolute;
	top: 7px;
	left: 7px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 8px;
	border-radius: var(--wi-radius-pill);
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	background: rgba(0,0,0,0.55);
	border: 1px solid var(--wi-border-gold);
	color: var(--wi-accent-secondary);
	backdrop-filter: blur(2px);
}
.wi-badge--type {
	border-color: rgba(255,255,255,0.25);
	color: var(--wi-oncard-text);
}

.wi-card__body {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 8px;
}
.wi-card__title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--wi-oncard-text);
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color var(--wi-transition);
}
.wi-card:hover .wi-card__title { color: var(--wi-accent); }

.wi-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	font-size: 11.5px;
	color: var(--wi-oncard-text-secondary);
}
.wi-card__meta span { display: inline-flex; align-items: center; gap: 3px; }

/* ==========================================================================
   20-24. VIDEO CARD GRID
   ========================================================================== */
.wi-grid--video {
	display: grid;
	grid-template-columns: repeat(var(--wi-cols-video), minmax(0, 1fr));
	gap: var(--wi-gap-card);
}

.wi-vcard { display: block; }
.wi-vcard__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--wi-radius-video);
	overflow: hidden;
	background: var(--wi-surface);
}
.wi-vcard__thumb img { width: 100%; height: 100%; object-fit: cover; }

.wi-vcard__play {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 36px; height: 36px;
	border-radius: 50%;
	background: rgba(20,10,10,0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform var(--wi-transition), background var(--wi-transition);
}
.wi-vcard:hover .wi-vcard__play { transform: translate(-50%,-50%) scale(1.08); background: rgba(var(--wi-accent-rgb), 0.65); }
.wi-vcard__play svg { width: 13px; height: 13px; fill: #fff; margin-left: 2px; }

.wi-vcard__duration {
	position: absolute;
	bottom: 6px;
	right: 6px;
	padding: 2px 6px;
	background: rgba(0,0,0,0.7);
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
}

.wi-vcard__body { padding-top: 7px; }
.wi-vcard__title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--wi-text);
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.wi-vcard:hover .wi-vcard__title { color: var(--wi-accent); }
.wi-vcard__sub {
	margin-top: 3px;
	font-size: 12px;
	color: var(--wi-text-muted);
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
}
.wi-vcard__cat { color: var(--wi-accent); font-weight: 600; }

/* ==========================================================================
   25. COMMUNITY CTA
   ========================================================================== */
.wi-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
	padding: 14px 18px;
	flex-wrap: wrap;
}
.wi-cta__title { font-size: 15px; font-weight: 800; }
.wi-cta__desc { font-size: 13px; color: var(--wi-text-secondary); margin-top: 2px; }
.wi-cta__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   26. CATEGORY PILLS
   ========================================================================== */
.wi-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.wi-pill {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: var(--wi-radius-pill);
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	font-size: 13px;
	font-weight: 600;
	color: var(--wi-text-secondary);
	transition: border-color var(--wi-transition), color var(--wi-transition), background var(--wi-transition);
}
.wi-pill:hover { color: var(--wi-text); border-color: var(--wi-border-strong); }
.wi-pill.is-active { color: var(--wi-accent); border-color: var(--wi-accent); background: rgba(var(--wi-accent-rgb), 0.1); }

/* ==========================================================================
   30. PAGINATION
   ========================================================================== */
.wi-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 22px;
	flex-wrap: wrap;
}
.wi-pagination a,
.wi-pagination span {
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--wi-text-secondary);
	border: 1px solid var(--wi-border-strong);
	background: transparent;
}
.wi-pagination a:hover { border-color: var(--wi-text-secondary); color: var(--wi-text); }
.wi-pagination .current {
	background: var(--wi-accent);
	border-color: var(--wi-accent);
	color: #fff;
}
.wi-pagination .dots { border-color: transparent; }

/* ==========================================================================
   32-33. FOOTER
   ========================================================================== */
.wi-footer {
	border-top: 1px solid var(--wi-border);
	margin-top: 32px;
	padding: 24px 0;
	text-align: center;
}
.wi-footer__logo { display: inline-flex; justify-content: center; margin-bottom: 10px; }
.wi-footer__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 14px;
	margin-bottom: 10px;
}
.wi-footer__links a { font-size: 13px; color: var(--wi-text-muted); transition: color var(--wi-transition); }
.wi-footer__links a:hover { color: var(--wi-text-secondary); }
.wi-footer__copy { font-size: 12.5px; color: var(--wi-text-muted); }

/* ==========================================================================
   AUTH FORMS (login / sign up / forgot / reset password)
   ========================================================================== */
.wi-auth {
	display: flex;
	justify-content: center;
	padding: 20px 0 40px;
}
.wi-auth__card {
	width: 100%;
	max-width: 400px;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
	padding: 28px 24px;
}
.wi-auth__title { font-size: 20px; font-weight: 800; text-align: center; }
.wi-auth__sub { font-size: 13.5px; color: var(--wi-text-secondary); text-align: center; margin-top: 4px; margin-bottom: 20px; }

.wi-field { margin-bottom: 14px; }
.wi-field label { display: block; font-size: 13px; font-weight: 700; color: var(--wi-text-secondary); margin-bottom: 6px; }
.wi-field input[type="text"],
.wi-field input[type="email"],
.wi-field input[type="password"],
.wi-field input[type="date"],
.wi-field select {
	width: 100%;
	height: 42px;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border-strong);
	border-radius: 6px;
	padding: 0 12px;
	font-size: 15px;
	color: var(--wi-text);
	font-family: inherit;
}
/* Native <select> and date-picker chrome (arrow/calendar icon) render
   dark-on-dark or light-on-dark depending on the OS otherwise — this
   keeps them legible and consistent with the theme. */
.wi-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
	padding-right: 36px;
}
.wi-field select option {
	background: var(--wi-surface);
	color: var(--wi-text);
}
/* Lets the browser pick an appropriately-colored native calendar icon
   itself instead of a fixed filter — a filter tuned for a dark field
   would make the icon vanish once the field is white in light mode. */
.wi-field input[type="date"] { color-scheme: dark; }
:root[data-theme="light"] .wi-field input[type="date"] { color-scheme: light; }
.wi-field input[type="date"]::-webkit-calendar-picker-indicator {
	cursor: pointer;
}
.wi-field input:focus,
.wi-field select:focus {
	outline: none;
	border-color: var(--wi-accent);
	box-shadow: 0 0 0 3px rgba(var(--wi-accent-rgb), 0.18);
}
.wi-field--checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wi-text-secondary); }
.wi-field--checkbox input { width: auto; height: auto; }

.wi-auth__submit {
	width: 100%;
	height: 44px;
	border-radius: var(--wi-radius-pill);
	background: var(--wi-accent);
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	margin-top: 4px;
	transition: filter var(--wi-transition);
}
.wi-auth__submit:hover { filter: brightness(1.08); }

.wi-auth__links { display: flex; justify-content: flex-end; margin-top: 14px; font-size: 12.5px; }
.wi-auth__links a { color: var(--wi-text-secondary); }
.wi-auth__links a:hover { color: var(--wi-accent); }

.wi-auth__foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--wi-text-secondary); }
.wi-auth__foot a { color: var(--wi-accent); font-weight: 700; }

.wi-alert {
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 13px;
	margin-bottom: 16px;
	border: 1px solid;
}
.wi-alert--error { background: rgba(255, 47, 134, 0.08); border-color: rgba(255, 47, 134, 0.4); color: #ff86b8; }
.wi-alert--success { background: rgba(40, 200, 120, 0.08); border-color: rgba(40, 200, 120, 0.4); color: #6fe3a8; }

.wi-resend-verify {
	background: var(--wi-bg-elevated, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--wi-border);
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 16px;
}
.wi-resend-verify .wi-field { margin-bottom: 10px; }
.wi-auth__submit--secondary {
	background: transparent;
	border: 1px solid var(--wi-accent);
	color: var(--wi-accent);
}
.wi-auth__submit--secondary:hover { background: rgba(var(--wi-accent-rgb), 0.08); filter: none; }
.wi-resend-verify__status { font-size: 13px; color: var(--wi-text-secondary); margin: 10px 0 0; }

.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.wi-turnstile { margin: 4px 0 14px; }

/* ==========================================================================
   DASHBOARD (front-end "My Account") — sidebar + tabbed main panel,
   matching movie-hub's own page-dashboard.php layout/behavior.
   ========================================================================== */
.wi-dash { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }

.wi-dash__sidebar {
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
	padding: 16px;
	position: sticky;
	/* Header is sticky too (46px, var(--wi-header-height)) — a flat 16px
	   offset would tuck this under the header's own sticky layer while
	   scrolling instead of resting just below it. */
	top: calc(var(--wi-header-height) + 16px);
}

.wi-dash__identity { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wi-dash__avatar-ring {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--wi-accent), var(--wi-accent-secondary));
}
.wi-dash__avatar-initials { font-size: 16px; font-weight: 800; color: #fff; }
.wi-dash__name { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 5px; }
.wi-dash__tick { display: inline-flex; color: #3b9eff; flex-shrink: 0; }
.wi-dash__meta { font-size: 12px; color: var(--wi-text-muted); margin-top: 2px; word-break: break-all; }

.wi-dash__status-pill {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: var(--wi-radius-pill);
	font-size: 11.5px;
	font-weight: 700;
	margin-bottom: 14px;
}
.wi-dash__status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.wi-dash__status-pill--active { background: rgba(40, 200, 120, 0.12); color: #6fe3a8; }
.wi-dash__status-pill--active .wi-dash__status-dot { background: #6fe3a8; }
.wi-dash__status-pill--expired { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.wi-dash__status-pill--expired .wi-dash__status-dot { background: #fbbf24; }
.wi-dash__status-pill--free { background: var(--wi-bg-alt); color: var(--wi-text-muted); }
.wi-dash__status-pill--free .wi-dash__status-dot { background: var(--wi-text-muted); }

.wi-dash__nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.wi-dash__nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 10px;
	border-radius: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wi-text-secondary);
	transition: background var(--wi-transition), color var(--wi-transition);
}
.wi-dash__nav-link:hover { background: rgba(255, 255, 255, 0.05); color: var(--wi-text); }
.wi-dash__nav-link.is-active { background: rgba(var(--wi-accent-rgb), 0.14); color: var(--wi-accent); }

.wi-dash__logout {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 10px;
	border-top: 1px solid var(--wi-border);
	margin-top: 6px;
	padding-top: 14px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wi-text-muted);
}
.wi-dash__logout:hover { color: #ff86b8; }

.wi-dash__main { min-width: 0; }
.wi-dash__tab { display: none; }
.wi-dash__tab.is-active {
	display: block;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
	padding: 20px;
}
.wi-dash__section-head { margin-bottom: 18px; }
.wi-dash__section-head h2 { font-size: 16px; font-weight: 800; }
.wi-dash__section-head p { font-size: 12.5px; color: var(--wi-text-muted); margin-top: 3px; }

.wi-dash__form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.wi-dash__profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.wi-dash__divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 24px 0 18px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wi-text-muted);
}
.wi-dash__divider::after { content: ""; flex: 1; height: 1px; background: var(--wi-border); }

.wi-dash__pw-wrap { position: relative; }
.wi-dash__pw-wrap input { padding-right: 40px !important; }
.wi-dash__pw-toggle {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--wi-text-muted);
	border-radius: 6px;
}
.wi-dash__pw-toggle:hover { color: var(--wi-text); background: rgba(255, 255, 255, 0.06); }

.wi-dash__sub-card {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	background: var(--wi-bg-alt);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
	padding: 18px;
	margin-bottom: 20px;
}
.wi-dash__sub-card.is-active { border-color: rgba(var(--wi-accent-rgb), 0.4); }
.wi-dash__sub-card.is-expired { border-color: rgba(251, 191, 36, 0.4); }
.wi-dash__sub-icon { font-size: 28px; line-height: 1; }
.wi-dash__sub-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.wi-dash__sub-card p { font-size: 13px; color: var(--wi-text-secondary); }

.wi-dash__stats-row { display: flex; gap: 12px; margin-bottom: 16px; }
.wi-dash__stat {
	flex: 1;
	background: var(--wi-bg-alt);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-btn);
	padding: 12px 14px;
	text-align: center;
}
.wi-dash__stat strong { display: block; font-size: 22px; font-weight: 800; color: var(--wi-accent); }
.wi-dash__stat span { font-size: 11px; color: var(--wi-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.wi-dash__badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: var(--wi-radius-pill);
	font-size: 10.5px;
	font-weight: 700;
	background: var(--wi-bg-alt);
	color: var(--wi-text-secondary);
	white-space: nowrap;
}
.wi-dash__badge--success { background: rgba(40, 200, 120, 0.12); color: #6fe3a8; }
.wi-dash__badge--error { background: rgba(255, 47, 134, 0.1); color: #ff86b8; }

.wi-dash__table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wi-dash__table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.wi-dash__table thead th {
	text-align: left;
	padding: 8px 12px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wi-text-muted);
	border-bottom: 1px solid var(--wi-border);
}
.wi-dash__table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--wi-border); color: var(--wi-text-secondary); }
.wi-dash__table tbody tr:last-child td { border-bottom: none; }
.wi-dash__table code { font-size: 11px; color: var(--wi-text-muted); }

@media (max-width: 767px) {
	.wi-dash { grid-template-columns: 1fr; gap: 14px; }
	.wi-dash__sidebar { position: static; }
	.wi-dash__nav { flex-direction: row; overflow-x: auto; gap: 4px; }
	.wi-dash__nav-link { white-space: nowrap; flex-shrink: 0; }
	.wi-dash__nav-link span { display: none; }
	.wi-dash__logout { justify-content: center; border-top: none; margin-top: 10px; padding-top: 0; }
	.wi-dash__form-grid { grid-template-columns: 1fr; }
	.wi-dash__tab.is-active { padding: 16px; }
	.wi-dash__sub-card { flex-direction: column; }
}

/* ==========================================================================
   ARCHIVE / SINGLE / SIDEBAR / FORMS (supporting content, kept compact/dark)
   ========================================================================== */
.wi-page-header { margin-bottom: 16px; }
.wi-page-header__title { font-size: 21px; font-weight: 800; }
.wi-page-header__desc { font-size: 14px; color: var(--wi-text-secondary); margin-top: 4px; }

.wi-single__meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--wi-text-muted);
	margin: 10px 0 16px;
}
/* Fixed banner height + object-fit:cover instead of height:auto — a
   portrait/poster-style featured image (common on a movie site) would
   otherwise scale to its full natural height at mobile widths and
   dominate the screen (e.g. a 2:3 image at a ~340px-wide phone renders
   ~510px tall). This crops any aspect ratio into a consistent banner. */
.wi-single__thumb { height: 320px; border-radius: var(--wi-radius-card); overflow: hidden; margin-bottom: 16px; }
.wi-single__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Video Post player (inc/post-format.php) — a proper 16:9 aspect-ratio
   box instead of a fixed height like the poster image above, since a
   video's own proportions actually matter and shouldn't be cropped. */
.wi-video-embed {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	border-radius: var(--wi-radius-card);
	overflow: hidden;
	margin-bottom: 16px;
	background: var(--wi-surface);
}
.wi-video-embed iframe,
.wi-video-embed embed,
.wi-video-embed object {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.wi-single__content {
	font-size: 16px;
	line-height: 1.8;
	color: var(--wi-text-secondary);
	/* Guards against a long unbroken URL/word in the post body forcing
	   the content column (and the whole page) wider than the viewport. */
	overflow-wrap: break-word;
}
.wi-single__content p { margin-bottom: 1em; }
.wi-single__content a { color: var(--wi-accent); }
.wi-single__content img { border-radius: var(--wi-radius-card); }
/* A table wider than its column, or a <pre> block with long unbroken
   lines, scrolls within its own box instead of stretching the page. */
.wi-single__content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; }
.wi-single__content pre { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Download section (template-parts/download-section.php) */
.wi-download-section {
	margin-top: 20px;
	padding: 18px;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
}
.wi-download-heading { font-size: 14.5px; font-weight: 800; margin-bottom: 12px; }
.wi-download-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.wi-download-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border-radius: var(--wi-radius-pill);
	font-size: 14px;
	font-weight: 700;
	border: 1px solid transparent;
	transition: filter var(--wi-transition), background var(--wi-transition), border-color var(--wi-transition);
}
.wi-download-btn--normal {
	background: transparent;
	border-color: var(--wi-accent);
	color: var(--wi-accent);
}
.wi-download-btn--normal:hover { background: rgba(var(--wi-accent-rgb), 0.1); }
.wi-download-btn--premium {
	background: linear-gradient(135deg, var(--wi-accent-secondary), #c99a00);
	color: #1a1200;
}
.wi-download-btn--premium:hover { filter: brightness(1.08); }
.wi-download-btn--locked {
	background: transparent;
	border-color: var(--wi-border-strong);
	color: var(--wi-text-muted);
	height: auto;
	min-height: 44px;
	padding: 8px 18px;
}
.wi-download-btn--locked:hover { border-color: var(--wi-text-secondary); color: var(--wi-text-secondary); }
/* Locked buttons still hint at which download type they gate, via the
   same accent/gold tones the unlocked buttons use, so "Normal" and
   "Premium" stay visually distinguishable even before you read the text. */
.wi-download-btn--locked.wi-download-btn--tint-normal { border-color: rgba(var(--wi-accent-rgb), 0.35); }
.wi-download-btn--locked.wi-download-btn--tint-normal:hover { border-color: var(--wi-accent); }
.wi-download-btn--locked.wi-download-btn--tint-premium { border-color: var(--wi-border-gold); }
.wi-download-btn--locked.wi-download-btn--tint-premium:hover { border-color: var(--wi-accent-secondary); }
.wi-download-btn__text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.3; }
.wi-download-btn__text strong { font-size: 14px; font-weight: 700; }
.wi-download-btn__text small { font-size: 11px; font-weight: 600; color: var(--wi-text-muted); }
.wi-download-note { margin-top: 10px; font-size: 13px; color: var(--wi-text-muted); }

@media (max-width: 767px) {
	.wi-download-buttons { flex-direction: column; }
	.wi-download-btn { width: 100%; justify-content: center; }
}

/* Premium Plans page (template-premium.php) */
.wi-plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.wi-plan-card {
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
	padding: 22px;
	text-align: center;
}
.wi-plan-card__label { font-size: 13.5px; font-weight: 800; color: var(--wi-text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.wi-plan-card__price { font-size: 28px; font-weight: 800; color: var(--wi-accent); margin: 10px 0 4px; }
.wi-plan-card__duration { font-size: 13px; color: var(--wi-text-muted); margin-bottom: 16px; }
.wi-plan-card__select { width: 100%; }
@media (max-width: 767px) {
	.wi-plans-grid { grid-template-columns: 1fr; }
}

.wi-payment-methods {
	max-width: 480px;
	margin: 0 auto;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	border-radius: var(--wi-radius-cta);
	padding: 22px;
}
/* Only one .wi-payment-method panel is ever visible at a time (JS
   toggles display based on the method selector below), so panels don't
   stack — no separator needed between them. */
.wi-payment-method { margin-bottom: 4px; }
.wi-payment-method h3 { font-size: 14.5px; font-weight: 800; margin-bottom: 8px; }
.wi-payment-qr { max-width: 180px; border-radius: 8px; margin-bottom: 8px; }

.wi-method-select {
	display: flex;
	gap: 6px;
	padding: 4px;
	margin-bottom: 18px;
	background: var(--wi-bg-alt);
	border-radius: var(--wi-radius-pill);
}
.wi-method-select__btn {
	flex: 1;
	height: 36px;
	padding: 0 12px;
	border-radius: var(--wi-radius-pill);
	border: none;
	background: transparent;
	color: var(--wi-text-secondary);
	font-size: 13px;
	font-weight: 700;
	transition: background var(--wi-transition), color var(--wi-transition);
}
.wi-method-select__btn.is-active { background: var(--wi-accent); color: #fff; }

/* Download wait / countdown page (template-parts/download-wait.php) */
.wi-download-wait { max-width: 480px; margin: 0 auto; text-align: center; padding: 20px 0 40px; }
.wi-download-wait__title { font-size: 20px; font-weight: 800; }
.wi-download-wait__file { font-size: 14px; color: var(--wi-text-secondary); margin-top: 6px; margin-bottom: 20px; }
.wi-download-wait__step { margin: 20px 0; }
.wi-download-wait__status { font-size: 14px; color: var(--wi-text-secondary); margin-bottom: 10px; }
.wi-download-wait__status span { color: var(--wi-accent); font-weight: 800; }
.wi-download-wait__bar { height: 8px; background: var(--wi-surface); border: 1px solid var(--wi-border); border-radius: 999px; overflow: hidden; }
.wi-download-wait__bar-fill { height: 100%; width: 0; background: var(--wi-accent); transition: width 1s linear; }
.wi-download-wait__cta { margin-top: 8px; }

.wi-ad-banner--wait { margin: 20px 0; }
.wi-ad-banner__slot--flex { width: auto; height: auto; min-height: 90px; padding: 10px; }

.widget { background: var(--wi-surface); border: 1px solid var(--wi-border); border-radius: var(--wi-radius-cta); padding: 14px; margin-bottom: 16px; overflow: hidden; }
.widget-title { font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 10px; color: var(--wi-text-secondary); }

/* Standard WP widgets: Search, Categories, Pages, Recent Posts, Archives, Nav Menu, Meta.
   Deliberately NOT display:flex on <li>/<a> — Categories/Pages widgets can append a
   trailing "(12)" post-count as loose text after the link, and Categories can nest a
   whole <ul> of child terms inside the same <li> when "Show hierarchy" is on. Flex would
   force that trailing content onto its own line; plain block/inline flow handles both
   correctly with zero extra markup. */
.wi-sidebar .widget:not(.wi-widget-popular) ul { list-style: none; margin: 0; padding: 0; }
.wi-sidebar .widget:not(.wi-widget-popular) ul ul { padding-left: 16px; margin-top: 8px; }

.wi-sidebar .widget:not(.wi-widget-popular) li {
	padding: 10px 14px;
	margin: 0 -14px;
	border-bottom: 1px solid var(--wi-border);
	font-size: 14px;
	line-height: 1.5;
	color: var(--wi-text-muted);
	transition: background var(--wi-transition);
}
.wi-sidebar .widget:not(.wi-widget-popular) li:last-child { border-bottom: none; }
.wi-sidebar .widget:not(.wi-widget-popular) li:hover { background: rgba(var(--wi-accent-rgb), 0.08); }

.wi-sidebar .widget:not(.wi-widget-popular) li::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 5px;
	margin-right: 8px;
	margin-bottom: 1px;
	border-radius: 50%;
	background: var(--wi-border-strong);
	vertical-align: middle;
	transition: background var(--wi-transition);
}
.wi-sidebar .widget:not(.wi-widget-popular) li:hover::before { background: var(--wi-accent); }

.wi-sidebar .widget:not(.wi-widget-popular) li a {
	color: var(--wi-text-secondary);
	transition: color var(--wi-transition);
}
.wi-sidebar .widget:not(.wi-widget-popular) li:hover a { color: var(--wi-text); }

.wi-sidebar .widget .post-date {
	display: block;
	width: 100%;
	font-size: 12px;
	color: var(--wi-text-muted);
	margin-top: 2px;
}

.wi-sidebar .widget select {
	width: 100%;
	height: 36px;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border-strong);
	border-radius: 6px;
	padding: 0 10px;
	color: var(--wi-text);
	font-size: 13.5px;
}

.wi-sidebar .widget .wp-block-search__inside-wrapper,
.wi-sidebar .widget .search-form { display: flex; gap: 6px; }
.wi-sidebar .widget input[type="search"],
.wi-sidebar .widget input[type="text"] {
	flex: 1;
	min-width: 0;
	height: 36px;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border-strong);
	border-radius: 6px;
	padding: 0 12px;
	color: var(--wi-text);
	font-size: 13.5px;
}
.wi-sidebar .widget input[type="search"]:focus,
.wi-sidebar .widget input[type="text"]:focus {
	outline: none;
	border-color: var(--wi-accent);
	box-shadow: 0 0 0 3px rgba(var(--wi-accent-rgb), 0.18);
}
.wi-sidebar .widget .search-submit,
.wi-sidebar .widget input[type="submit"] {
	flex-shrink: 0;
	height: 36px;
	padding: 0 16px;
	background: var(--wi-accent);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: filter var(--wi-transition);
}
.wi-sidebar .widget .search-submit:hover,
.wi-sidebar .widget input[type="submit"]:hover { filter: brightness(1.08); }

/* Popular Posts (automatic sidebar block, inc/template-tags.php) */
.wi-popular-list { list-style: none; margin: 0; padding: 0; }
.wi-popular-item {
	display: flex;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--wi-border);
}
.wi-popular-item:first-child { padding-top: 0; }
.wi-popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.wi-popular-item__thumb {
	flex: 0 0 54px;
	width: 54px;
	height: 72px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--wi-surface-alt);
}
.wi-popular-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wi-popular-item__body { min-width: 0; }
.wi-popular-item__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--wi-text);
	transition: color var(--wi-transition);
}
.wi-popular-item__title:hover { color: var(--wi-accent); }
.wi-popular-item__meta {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 5px;
	font-size: 12px;
	color: var(--wi-text-muted);
}

/* Sidebar ad banners — admin drops a Custom HTML/Image widget into the
   matching widget area; the wrapper just reserves the correct size. */
.wi-ad-banner { margin-bottom: 16px; }
.wi-ad-banner__label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wi-text-muted);
	text-align: center;
	margin-bottom: 6px;
}
.wi-ad-banner__slot {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	background: var(--wi-surface);
	border: 1px dashed var(--wi-border-strong);
	border-radius: var(--wi-radius-cta);
	overflow: hidden;
}
.wi-ad-banner__slot img { max-width: 100%; height: auto; display: block; }
.wi-ad-banner--mrec .wi-ad-banner__slot { width: 300px; height: 250px; max-width: 100%; }
.wi-ad-banner--banner .wi-ad-banner__slot { width: 300px; height: 100px; max-width: 100%; }

/* Responsive banner swap — a 728x90 leaderboard doesn't fit a phone
   viewport, and small mrec/banner ads look sparse next to a leaderboard
   on desktop, so each breakpoint gets its own sizes instead of stacking
   all of them everywhere. Mirrors .wi-section--leaderboard's breakpoint. */
.wi-ad-banner--desktop-only { display: block; }
.wi-ad-banner--mobile-only { display: none; }
.wi-section--mobile-only { display: none; }

.wi-content-none { text-align: center; padding: 60px 20px; color: var(--wi-text-secondary); }
.wi-content-none .wi-search { justify-content: center; margin: 16px auto 0; max-width: 320px; }

.wi-search--page { justify-content: center; margin: 24px auto 0; max-width: 480px; }
.wi-search--page input[type="search"] { width: 100%; height: 46px; font-size: 15px; padding-left: 42px; }
.wi-search--page .wi-search__icon { left: 16px; }
.wi-search--page .wi-search__icon svg { width: 18px; height: 18px; }
.wi-search--page .wi-search__submit { width: 46px; height: 46px; }
.wi-content-none .wi-search input { width: 100%; }

/* ==========================================================================
   COMMENTS (comments.php)
   ========================================================================== */
.wi-comments-area { margin-top: 28px; }
.wi-comments-title { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.wi-comments-closed { font-size: 14px; color: var(--wi-text-secondary); margin-bottom: 16px; }

.wi-comment-list,
.wi-comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}
.wi-comment-list .children {
	margin-top: 14px;
	padding-left: 20px;
	border-left: 1px solid var(--wi-border);
}
.wi-comment-item { margin-bottom: 18px; }
.wi-comment-item:last-child { margin-bottom: 0; }

.wi-comment { display: flex; gap: 12px; }
.wi-comment__avatar { flex: 0 0 auto; }
.wi-comment__avatar img { border-radius: 50%; display: block; }
.wi-comment__body { min-width: 0; flex: 1; }
.wi-comment__meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wi-comment__author { font-size: 14.5px; font-weight: 700; color: var(--wi-text); }
.wi-comment__date a { font-size: 12.5px; color: var(--wi-text-muted); }
.wi-comment__date a:hover { color: var(--wi-accent); }
.wi-comment__pending {
	margin-top: 6px;
	font-size: 12.5px;
	font-style: italic;
	color: var(--wi-accent-secondary);
}
.wi-comment__content { margin-top: 6px; font-size: 15px; line-height: 1.65; color: var(--wi-text-secondary); }
.wi-comment__content p { margin-bottom: 0.8em; }
.wi-comment__content p:last-child { margin-bottom: 0; }
.wi-comment__content a { color: var(--wi-accent); }
.wi-comment__reply { margin-top: 6px; }
.wi-comment__reply a {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--wi-accent);
}
.wi-comment__reply a:hover { text-decoration: underline; }

.wi-comment-form { margin-top: 24px; }
.wi-field textarea {
	width: 100%;
	min-height: 110px;
	resize: vertical;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border-strong);
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 15px;
	font-family: inherit;
	color: var(--wi-text);
}
.wi-field textarea:focus {
	outline: none;
	border-color: var(--wi-accent);
	box-shadow: 0 0 0 3px rgba(var(--wi-accent-rgb), 0.18);
}
.wi-comment-form .comment-notes,
.wi-comment-form .logged-in-as { font-size: 13px; color: var(--wi-text-secondary); margin-bottom: 14px; }
.wi-comment-form .comment-notes a,
.wi-comment-form .logged-in-as a { color: var(--wi-accent); }
.wi-comment-form .form-submit { margin-top: 4px; }

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.wi-card:focus-visible,
.wi-vcard:focus-visible {
	outline: 2px solid var(--wi-accent);
	outline-offset: 2px;
}
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--wi-accent);
	color: #fff;
	padding: 10px 16px;
	z-index: 999;
	border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   RESPONSIVE — DESKTOP / TABLET
   ========================================================================== */
@media (max-width: 1199px) {
	:root { --wi-cols-portrait: 4; --wi-cols-video: 3; }
}
@media (max-width: 991px) {
	:root {
		--wi-cols-portrait: 3;
		--wi-cols-video: 2;
		--wi-container-pad: 16px;
	}
	.wi-layout.has-sidebar { grid-template-columns: 1fr; }
}

/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */
@media (max-width: 767px) {
	:root {
		--wi-cols-portrait: 2;
		--wi-cols-video: 1;
		--wi-container-pad: 8px;
		--wi-gap-card: 6px;
		--wi-section-gap: 16px;
		--wi-header-height: 40px;
	}

	/* Taller ratio than desktop so each of the 2 mobile columns reads as a
	   bigger, more prominent thumbnail without adding a 3rd column. */
	.wi-card { aspect-ratio: 0.6 / 1; }

	.wi-page-top { padding-top: 12px; }

	.wi-header { position: sticky; height: auto; }
	.wi-header__row { height: 40px; }
	.wi-header__nav { display: none; }
	/* Join Free stays hidden to keep the row compact (still reachable from
	   the bottom-nav Menu drawer) — Sign In / Log out (both .wi-btn--outline)
	   stay visible since the user wants a login/logout action in the header
	   itself, not just in the drawer. */
	.wi-header__actions .wi-btn--primary { display: none; }
	.wi-header__actions .wi-btn--outline,
	.wi-header__actions .wi-btn--premium {
		height: 30px;
		padding: 0 9px;
		font-size: 12.5px;
	}
	.wi-header__desktop-search { display: none; }
	/* 728x90 is a desktop/tablet leaderboard size — no equivalent slot is
	   shown in its place on mobile, it's just omitted. */
	.wi-section--leaderboard { display: none; }
	.wi-ad-banner--desktop-only { display: none; }
	.wi-ad-banner--mobile-only { display: block; }
	.wi-section--mobile-only { display: flex; justify-content: center; }

	.wi-tabbar { display: flex; }
	/* Room at the bottom so the fixed tab bar never covers page content. */
	.wi-site { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

	.wi-logo { font-size: 16px; }
	.wi-logo img { height: 17px; }

	/*
	 * Readability pass for mobile: several base sizes (12px card titles,
	 * 9-11px meta/badges, 11.5px labels, etc.) were designed for
	 * desktop's closer/denser layout and read too small on a phone.
	 * These bump the smallest, most-read text back up instead of
	 * shrinking it further — a few (section headers, buttons) were
	 * previously going SMALLER than their desktop size here, which is
	 * backwards for a smaller screen.
	 */
	body { font-size: 15px; }

	.wi-section-header__title { font-size: 16px; }
	.wi-btn--accent-outline { height: 28px; font-size: 12.5px; padding: 0 11px; }

	.wi-card__title { font-size: 13.5px; }
	.wi-card__meta { font-size: 11.5px; }
	.wi-badge { font-size: 10px; padding: 3px 8px; }

	.wi-cta { flex-direction: column; align-items: stretch; text-align: center; padding: 14px; }
	.wi-cta__actions { justify-content: center; }
	.wi-cta__actions .wi-btn { flex: 1 1 auto; }
	.wi-cta__title { font-size: 15px; }
	.wi-cta__desc { font-size: 13px; }

	.wi-vcard__title { font-size: 13.5px; }
	.wi-vcard__sub { font-size: 12px; }

	.wi-page-header__title { font-size: 21px; }
	.wi-page-header__desc { font-size: 14px; }
	.wi-single__thumb { height: 200px; }
	.wi-single__content { font-size: 16px; line-height: 1.8; }

	.wi-comments-title { font-size: 17px; }
	.wi-comment__author { font-size: 14.5px; }
	.wi-comment__content { font-size: 15px; }
	.wi-comment__date a, .wi-comment__reply a { font-size: 12.5px; }

	.wi-field label { font-size: 13px; }
	/* Matching the base rule's [type="..."] specificity so this actually
	   wins the cascade instead of being silently outranked by it. 16px
	   also keeps iOS Safari from zooming in on focus. */
	.wi-field input[type="text"],
	.wi-field input[type="email"],
	.wi-field input[type="password"],
	.wi-field input[type="date"],
	.wi-field select,
	.wi-field textarea { font-size: 16px; }
	.wi-auth__title { font-size: 20px; }
	.wi-auth__sub { font-size: 14px; }
	.wi-download-note { font-size: 13px; }

	.widget-title { font-size: 13.5px; }
	.wi-popular-item__title { font-size: 14px; }
	.wi-popular-item__meta { font-size: 12px; }

	.wi-footer__links a { font-size: 13px; }
	.wi-footer__copy { font-size: 12.5px; }
}

@media (max-width: 479px) {
	:root { --wi-cols-portrait: 2; }
}

/* ==========================================================================
   AGE VERIFICATION GATE (inc/age-verification.php)
   ========================================================================== */
.wi-age-backdrop {
	/* display:none by default, not the [hidden] attribute — a plain class
	   rule setting display:flex on this same element would always beat the
	   browser's built-in [hidden]{display:none} default regardless of
	   selector order, silently defeating it (the exact bug that made this
	   gate ignore "already verified" and reappear on every fresh page). */
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(6px);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.wi-age-backdrop.is-open { display: flex; }
.wi-age-box {
	background: var(--wi-surface);
	border: 1px solid var(--wi-border);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
	padding: 32px 24px;
	border-radius: var(--wi-radius-cta);
	text-align: center;
	max-width: 400px;
	width: 100%;
	font-family: var(--wi-font);
	animation: wi-age-fade-in 0.4s ease;
}
.wi-age-icon { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--wi-accent); }
.wi-age-box h2 { color: var(--wi-text); font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.wi-age-box p { color: var(--wi-text-secondary); font-size: 13.5px; line-height: 1.6; margin: 0 0 24px; }
.wi-age-box button {
	width: 100%;
	margin: 6px 0;
	padding: 13px;
	font-family: var(--wi-font);
	font-size: 13.5px;
	font-weight: 800;
	border-radius: var(--wi-radius-pill);
	border: none;
	cursor: pointer;
	transition: transform var(--wi-transition), box-shadow var(--wi-transition), background var(--wi-transition), color var(--wi-transition);
}
.wi-age-yes { background: var(--wi-accent); color: #ffffff; box-shadow: 0 8px 20px rgba(var(--wi-accent-rgb), 0.35); }
.wi-age-yes:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(var(--wi-accent-rgb), 0.45); }
.wi-age-no { background: var(--wi-surface-alt); color: var(--wi-text-muted); }
.wi-age-no:hover { background: var(--wi-border-strong); color: var(--wi-text); }
@keyframes wi-age-fade-in {
	from { opacity: 0; transform: scale(0.96); }
	to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   BACK TO TOP BUTTON (inc/back-to-top.php)
   ========================================================================== */
.wi-back-to-top {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--wi-surface);
	border: 1px solid var(--wi-border-strong);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 4px rgba(var(--wi-accent-rgb), 0.15);
	cursor: pointer;
	transition-duration: 0.3s;
	overflow: hidden;
	position: fixed;
	bottom: 25px;
	right: 25px;
	z-index: 150;
	opacity: 0;
	visibility: hidden;
}
.wi-back-to-top.show { opacity: 1; visibility: visible; }
.wi-back-to-top.active { width: 140px; border-radius: 50px; background: var(--wi-accent); }
.wi-back-to-top__icon { width: 12px; transition: transform 0.3s; }
.wi-back-to-top__icon path { fill: #ffffff; }
.wi-back-to-top.active .wi-back-to-top__icon { transform: translateY(-200%); }
.wi-back-to-top::before {
	position: absolute;
	bottom: -20px;
	content: "Back to Top";
	color: #ffffff;
	font-size: 0;
	transition: all 0.3s ease;
}
.wi-back-to-top.active::before { font-size: 13px; bottom: unset; opacity: 1; }

@media (max-width: 767px) {
	/* Clears the fixed bottom tab bar (.wi-tabbar, ~56px + safe-area)
	   instead of sitting on top of its "Menu" tab. */
	.wi-back-to-top { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
