/*
 Theme Name:   Bloggist
 Description:  Full-screen layout.
 Author:       Superb Themes
 Version:      1.0
*/

/* --------------------------------------------------------------------------
   Full-screen website: viewport and layout
   -------------------------------------------------------------------------- */

html {
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	scroll-behavior: smooth;
	box-sizing: border-box;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	min-height: 100%;
	min-height: 100dvh;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	width: 100%;
	overflow-x: hidden;
}

/* WordPress admin bar: prevent body top padding when bar is present */
body.admin-bar #page {
	min-height: calc(100vh - 32px);
	min-height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar #page {
		min-height: calc(100vh - 46px);
		min-height: calc(100dvh - 46px);
	}
}

#page {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	padding: 0;
}

#content {
	flex: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

#primary {
	flex: 1;
}

/* Full-width inner: edge padding + safe area for notched devices */
.site-content-inner {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	padding-left: max(1rem, env(safe-area-inset-left));
	padding-right: max(1rem, env(safe-area-inset-right));
}

@media (min-width: 640px) {
	.site-content-inner {
		padding-left: max(1.5rem, env(safe-area-inset-left));
		padding-right: max(1.5rem, env(safe-area-inset-right));
	}
}

@media (min-width: 1024px) {
	.site-content-inner {
		padding-left: max(2rem, env(safe-area-inset-left));
		padding-right: max(2rem, env(safe-area-inset-right));
	}
}

/* Home page: thumbnail-sized cards – preserve image quality when scaled down */
.featured-img-box--thumbnail img,
.product-card__image--thumbnail img {
	display: block;
	/* Sharper downscaling on high-DPI screens without blockiness */
	image-rendering: -webkit-optimize-contrast;
}

/* Title overlay at bottom of card image – always readable regardless of image colors */
.card-title-overlay {
	/* Fallback for older browsers: solid dark bar */
	background: linear-gradient( to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 50%, transparent 100% );
	text-align: center;
}
.card-title-overlay h2,
.card-title-overlay .entry-title {
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 1px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Responsive: mobile & tablet – prevent UI break
   ========================================================================== */

/* Safe area for notched devices (e.g. iPhone X+) */
#page {
	padding-left: env(safe-area-inset-left, 0);
	padding-right: env(safe-area-inset-right, 0);
	padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Prevent horizontal overflow everywhere */
#page,
#content,
#primary,
.site-content-inner,
main {
	max-width: 100%;
	overflow-x: hidden;
}

.rv-card-list {
	min-width: 0;
}

/* Cards never exceed grid cell */
.rv-card--thumbnail,
.product-card--thumbnail {
	max-width: 100%;
}

/* List card: fixed info height so all cards match; OTT optional, rating always in place */
.product-card--thumbnail {
	display: flex;
	flex-direction: column;
}
.product-card--thumbnail .product-card__image {
	flex-shrink: 0;
}
.product-card--thumbnail .product-card__info {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
/* Fixed heights so card height is identical with or without OTT content */
.product-card__ott-slot {
	height: 2.25rem;
	flex-shrink: 0;
}
.product-card__rating-slot {
	height: 1.75rem;
	flex-shrink: 0;
}
@media (min-width: 640px) {
	.product-card__ott-slot {
		height: 2.5rem;
	}
	.product-card__rating-slot {
		height: 2rem;
	}
}

/* Entry content: wrap long text and constrain embedded content */
.entry-content,
.mv-body {
	overflow-wrap: break-word;
	word-wrap: break-word;
	word-break: break-word;
	max-width: 100%;
}

.entry-content img,
.entry-content iframe,
.entry-content video,
.entry-content table,
.mv-body img,
.mv-body iframe,
.mv-body video,
.mv-body table {
	max-width: 100%;
	height: auto;
}

.entry-content table,
.mv-body table {
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Footer: stack and don't overflow on small screens */
.site-info {
	flex-wrap: wrap;
	justify-content: center;
	text-align: center;
}

.site-info .th-footer-credit {
	width: 100%;
	margin-top: 0.25rem;
}

@media (min-width: 640px) {
	.site-info {
		justify-content: space-between;
		text-align: left;
	}
	.site-info .th-footer-credit {
		width: auto;
		margin-top: 0;
	}
}

/* Single post hero: image left, content right on all devices */
.mv-hero {
	flex-wrap: nowrap;
	max-width: 100%;
	flex-direction: row;
}
.mv-hero__poster {
	flex-shrink: 0;
}
.mv-hero__content {
	min-width: 0;
}

/* Fixed header nav: stays at top on all devices (mobile, tablet, desktop) */
.header-nav-fixed {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
}
/* Spacer so page content starts below the fixed nav */
.header-nav-spacer {
	flex-shrink: 0;
}
/* Admin bar: push fixed nav down when logged in */
body.admin-bar .header-nav-fixed {
	top: 32px;
}
@media screen and (max-width: 782px) {
	body.admin-bar .header-nav-fixed {
		top: 46px;
	}
}

/* Header: prevent logo and title overflow on narrow screens */
#masthead .site-content-inner {
	min-width: 0;
}
#masthead a[rel="home"] {
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Mobile drawer: respect safe area */
.mobile-drawer {
	padding-right: env(safe-area-inset-right, 0);
	padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Touch targets: minimum 44px for interactive elements (accessibility) */
@media (pointer: coarse) {
	.mobile-menu-toggle,
	.mobile-menu-close,
	.blogpost-button,
	.mobile-nav a {
		min-height: 44px;
		min-width: 44px;
	}
	.mobile-menu-toggle,
	.mobile-menu-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	.mobile-nav a {
		display: flex;
		align-items: center;
		padding-top: 0.875rem;
		padding-bottom: 0.875rem;
	}
}

/* Pagination and buttons: don't overflow on small screens */
.rv-card-list + .flex {
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

/* ==========================================================================
   OTT / Watch provider logo – visible on all devices
   ========================================================================== */
.ott-logo {
	/* Solid background so logo is visible on any poster/card */
	background-color: #fff !important;
}

.ott-logo img {
	display: block;
	object-fit: contain;
	object-position: center;
}

/* Card: smaller on mobile, larger from sm */
.ott-logo--card {
	min-width: 20px;
	min-height: 20px;
}

@media (min-width: 640px) {
	.ott-logo--card {
		min-width: 32px;
		min-height: 32px;
	}
}

/* Single post: smaller on mobile, larger from sm/md */
.ott-logo--single {
	min-width: 28px;
	min-height: 28px;
}

@media (min-width: 640px) {
	.ott-logo--single {
		min-width: 48px;
		min-height: 48px;
	}
}

@media (min-width: 768px) {
	.ott-logo--single {
		min-width: 56px;
		min-height: 56px;
	}
}

/* Text fallback when no logo: ensure readable */
.ott-logo--text {
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* List page: OTT chip – clear “where to watch” block */
.ott-chip {
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.ott-chip:hover {
	background-color: rgba(251, 191, 36, 0.08);
	border-color: rgba(245, 158, 11, 0.3);
}
.ott-provider-name {
	line-height: 1.2;
}

/* List card: poster-dominant, overlay only (no separate info block) */
.rv-card__title {
	margin: 0;
}
.rv-card__overlay {
	pointer-events: none;
}
.rv-card__rating svg,
.rv-card__meta .rv-card__rating [class*="shrink-0"] svg {
	color: currentColor;
}

/* Listing card: score pill (used elsewhere) */
.rv-score-pill {
	letter-spacing: -0.02em;
}
.rv-score-pill__value {
	letter-spacing: -0.02em;
}

/* Rating: single post editorial block */
.rating-editorial__score {
	letter-spacing: -0.03em;
	line-height: 1.1;
}

/* Half-star clip (e.g. 4.5 → show half-filled star) */
.mv-star-half__fill {
	clip-path: inset(0 50% 0 0);
	-webkit-clip-path: inset(0 50% 0 0);
}

/* Recommendation badge on card image (top-right, no rotation) */
.rv-ribbon-wrap {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	z-index: 10;
	pointer-events: none;
}
.rv-ribbon {
	display: inline-block;
	padding: 0.2rem 0.45rem;
	font-size: 0.4375rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
	background-color: #7c3aed;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
	white-space: nowrap;
	box-sizing: border-box;
	border-radius: 0.25rem;
}
@media (min-width: 640px) {
	.rv-ribbon-wrap {
		top: 0.35rem;
		right: 0.35rem;
	}
	.rv-ribbon {
		padding: 0.22rem 0.5rem;
		font-size: 0.46875rem;
	}
}
@media (min-width: 768px) {
	.rv-ribbon {
		font-size: 0.5rem;
	}
}
@media (min-width: 1024px) {
	.rv-ribbon-wrap {
		top: 0.4rem;
		right: 0.4rem;
	}
	.rv-ribbon {
		padding: 0.25rem 0.55rem;
		font-size: 0.53125rem;
		border-radius: 0.3rem;
	}
}

/* Recommendation badge (chip) – single post + search dropdown */
.rv-recommendation {
	letter-spacing: 0.02em;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.rv-recommendation:hover {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pagination: 12 posts per page; only shown when more than one page */
.rv-pagination {
	display: block;
	width: 100%;
}
.rv-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.rv-pagination .page-numbers li {
	margin: 0;
	padding: 0;
}
.rv-pagination .page-numbers a,
.rv-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	color: #404040;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 0.375rem;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.rv-pagination .page-numbers a:hover {
	color: #b45309;
	background: #fffbeb;
	border-color: #f59e0b;
}
.rv-pagination .page-numbers .current {
	color: #fff;
	background: #f59e0b;
	border-color: #f59e0b;
	pointer-events: none;
}
.rv-pagination .page-numbers .prev,
.rv-pagination .page-numbers .next {
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}
.rv-pagination .page-numbers .dots {
	border: none;
	background: transparent;
	color: #a3a3a3;
}

/* Language carousel: horizontal scroll, no wrap */
.rv-lang-carousel {
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.rv-lang-carousel__inner .rv-card--thumbnail {
	flex-shrink: 0;
	max-width: 140px;
}
@media (min-width: 640px) {
	.rv-lang-carousel__inner .rv-card--thumbnail {
		max-width: 160px;
	}
}
/* Desktop: larger cards in carousel */
@media (min-width: 1024px) {
	.rv-lang-carousel__inner .rv-card--thumbnail {
		width: 200px;
		max-width: 200px;
	}
}
