/*!
Theme Name: TikTok starter
Theme URI: https://developer.wordpress.org/themes/starter-themes/starter-starter/
Author: Developer
Author URI: https://developer.wordpress.org/
Description: A TikTok-inspired WordPress theme with vertical scroll-snap for posts and horizontal scroll-snap for categories. Built on Starter starter (_s).
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: tiktok-starter
Tags: full-width, one-column, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

TikTok starter is based on starter starter (https://starter starter.developer.wordpress.org/starter-starter/).
starter starter is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
# Layouts
# Components
	- TikTok App
	- Navigation
	- Post Cards
	- Actions
	- Single Post
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# Plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
}

main {
	display: block;
}

h1 {
	font-size: 2em;
	margin: 0.67em 0;
}

hr {
	box-sizing: content-box;
	height: 0;
	overflow: visible;
}

pre {
	font-family: monospace, monospace;
	font-size: 1em;
}

a {
	background-color: transparent;
}

abbr[title] {
	border-bottom: none;
	text-decoration: underline;
	text-decoration: underline dotted;
}

b,
strong {
	font-weight: bolder;
}

code,
kbd,
samp {
	font-family: monospace, monospace;
	font-size: 1em;
}

small {
	font-size: 80%;
}

sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

img {
	border-style: none;
}

button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
}

button,
input {
	overflow: visible;
}

button,
select {
	text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
	outline: 1px dotted ButtonText;
}

fieldset {
	padding: 0.35em 0.75em 0.625em;
}

legend {
	box-sizing: border-box;
	color: inherit;
	display: table;
	max-width: 100%;
	padding: 0;
	white-space: normal;
}

progress {
	vertical-align: baseline;
}

textarea {
	overflow: auto;
}

[type="checkbox"],
[type="radio"] {
	box-sizing: border-box;
	padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	height: auto;
}

[type="search"] {
	-webkit-appearance: textfield;
	outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
}

::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

details {
	display: block;
}

summary {
	display: list-item;
}

template {
	display: none;
}

[hidden] {
	display: none;
}

/* Box sizing
--------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/

/* Typography
--------------------------------------------- */
body,
button,
input,
select,
optgroup,
textarea {
	color: var(--tiktok-text-color, #fff);
	font-family: var(--tiktok-body-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
	font-size: 1rem;
	line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--tiktok-title-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
	clear: both;
}

p {
	margin-bottom: 1.5em;
}

dfn,
cite,
em,
i {
	font-style: italic;
}

blockquote {
	margin: 0 1.5em;
}

address {
	margin: 0 0 1.5em;
}

pre {
	background: rgba(255, 255, 255, 0.1);
	font-family: "Courier 10 Pitch", courier, monospace;
	line-height: 1.6;
	margin-bottom: 1.6em;
	max-width: 100%;
	overflow: auto;
	padding: 1.6em;
	border-radius: 8px;
}

code,
kbd,
tt,
var {
	font-family: monaco, consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

abbr,
acronym {
	border-bottom: 1px dotted #666;
	cursor: help;
}

mark,
ins {
	background: rgba(255, 255, 255, 0.2);
	text-decoration: none;
}

big {
	font-size: 125%;
}

/* Elements
--------------------------------------------- */
body {
	background: var(--tiktok-bg-color, #000);
	width: 100vw;
}

body.tiktok-feed {
	overflow: hidden;
	height: 100vh;
	height: 100dvh;
}

body.tiktok-single,
body.tiktok-page,
body.page,
body.search-no-results {
	overflow-y: auto;
	overflow-x: hidden;
	height: auto;
	min-height: 100vh;
}

hr {
	background-color: rgba(255, 255, 255, 0.1);
	border: 0;
	height: 1px;
	margin-bottom: 1.5em;
}

ul,
ol {
	margin: 0 0 1.5em 3em;
}

ul {
	list-style: disc;
}

ol {
	list-style: decimal;
}

li > ul,
li > ol {
	margin-bottom: 0;
	margin-left: 1.5em;
}

dt {
	font-weight: 700;
}

dd {
	margin: 0 1.5em 1.5em;
}

embed,
iframe,
object {
	max-width: 100%;
}

img {
	height: auto;
	max-width: 100%;
}

svg {
	max-width: 100%;
	height: auto;
}

/* Ensure SVGs in content don't overflow */
.entry-content svg,
.page-content svg,
.post-content svg,
.single-post-content svg {
	max-width: 100%;
	height: auto;
	display: block;
}

figure {
	margin: 1em 0;
}

table {
	margin: 0 0 1.5em;
	width: 100%;
}

/* Links
--------------------------------------------- */
a {
	color: var(--tiktok-text-color, #fff);
	text-decoration: none;
}

a:visited {
	color: var(--tiktok-text-color, #fff);
}

a:hover,
a:focus,
a:active {
	color: var(--tiktok-accent-color, #69b4ff);
}

a:focus {
	outline: thin dotted;
}

a:hover,
a:active {
	outline: 0;
}

/* Forms
--------------------------------------------- */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border: 1px solid;
	border-color: rgba(255, 255, 255, 0.2);
	border-radius: 25px;
	background: var(--tiktok-accent-color, #69b4ff);
	color: #000;
	line-height: 1;
	padding: 0.8em 1.5em;
	cursor: pointer;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
	opacity: 0.9;
}

button:active,
button:focus,
input[type="button"]:active,
input[type="button"]:focus,
input[type="reset"]:active,
input[type="reset"]:focus,
input[type="submit"]:active,
input[type="submit"]:focus {
	opacity: 0.8;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
	color: #fff;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 12px 16px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
	outline: none;
}

select {
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
	padding: 8px;
	border-radius: 8px;
}

textarea {
	width: 100%;
}

/*--------------------------------------------------------------
# Layouts
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/* TikTok App Container
--------------------------------------------- */
.tiktok-app {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	position: relative;
}

.categories-container {
	display: flex;
	width: 100%;
	height: 100%;
	overflow-x: scroll;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.categories-container::-webkit-scrollbar {
	display: none;
}

.category-feed {
	flex: 0 0 100vw;
	width: 100vw;
	height: 100%;
	overflow-x: hidden;
	overflow-y: scroll;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	scroll-snap-align: start;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;
	scrollbar-width: none;
	display: flex;
	flex-direction: column;
}

.category-feed::-webkit-scrollbar {
	display: none;
}

/* Site Header
--------------------------------------------- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 110;
	padding: 12px 16px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
	transition: background 0.3s ease;
}

.site-header--solid {
	background: var(--tiktok-bg-color, #000);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header--blur {
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1400px;
	margin: 0 auto;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
}

.site-logo {
	flex-shrink: 0;
}

.site-logo img {
	height: 36px;
	width: auto;
	display: block;
}

.site-titles {
	display: flex;
	flex-direction: column;
}

.site-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	line-height: 1.2;
}

.site-title a {
	color: #fff;
	text-decoration: none;
}

.site-description {
	font-size: 12px;
	opacity: 0.7;
	margin: 2px 0 0 0;
}

/* Header Back Button */
.site-header__back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	color: #fff;
	flex-shrink: 0;
	margin-right: 8px;
	transition: background 0.2s ease;
}

.site-header__back:hover {
	background: rgba(255, 255, 255, 0.2);
}

.site-header__back svg {
	width: 20px;
	height: 20px;
}

/* Header with back button */
.site-header--with-back .site-header__inner {
	gap: 8px;
}

/* Archive/Search Nav Adjustments */
.archive-nav,
.search-nav {
	top: 60px;
}

.has-header .archive-nav,
.has-header .search-nav {
	top: 60px;
}

.top-nav__description {
	font-size: 13px;
	opacity: 0.6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 200px;
}

/* Search Form in Nav */
.search-form-nav {
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	padding: 0 15px;
	flex: 1;
	max-width: 400px;
	transition: background 0.2s ease;
}

.search-form-nav:focus-within {
	background: rgba(255, 255, 255, 0.15);
}

.search-form-nav__icon {
	width: 18px;
	height: 18px;
	opacity: 0.6;
	flex-shrink: 0;
}

.search-form-nav__input {
	width: 100%;
	padding: 10px 12px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 14px;
	outline: none;
}

.search-form-nav__input::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

/* Search Results Count */
.search-results-count {
	padding: 80px 20px 20px;
	scroll-snap-align: none;
}

.search-results-count p {
	font-size: 14px;
	opacity: 0.7;
}

@media (min-width: 700px) {
	.search-results-count {
		padding-top: 140px;
		grid-column: 1 / -1;
	}
	
	.has-header .search-results-count {
		padding-top: 140px;
	}
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	padding: 10px;
	transition: background 0.2s ease;
	z-index: 120;
}

.menu-toggle:hover {
	background: rgba(255, 255, 255, 0.2);
}

.menu-toggle__bar {
	display: block;
	width: 100%;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active .menu-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .menu-toggle__bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle.active .menu-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.menu-toggle--floating {
	position: fixed;
	top: 15px;
	right: 15px;
}

/* Overlay Menu */
.overlay-menu {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.95);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	z-index: 115;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	overflow-y: auto;
}

.overlay-menu.active {
	opacity: 1;
	visibility: visible;
}

.overlay-menu__inner {
	min-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px 40px;
	text-align: center;
}

.overlay-menu__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
	padding: 0;
}

.overlay-menu__close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

.overlay-menu__close svg {
	width: 22px;
	height: 22px;
	display: block;
}

.overlay-menu__logo {
	margin-bottom: 40px;
}

.overlay-menu__logo img {
	height: 60px;
	width: auto;
}

.overlay-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.overlay-nav__list li {
	margin: 0;
}

.overlay-nav__list a {
	display: block;
	padding: 16px 20px;
	font-size: 24px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.overlay-nav__list a:hover {
	opacity: 0.7;
}

.overlay-nav__list .sub-menu {
	list-style: none;
	padding: 0;
	margin: 0 0 10px 0;
}

.overlay-nav__list .sub-menu a {
	font-size: 18px;
	font-weight: 400;
	opacity: 0.8;
	padding: 10px 20px;
}

.overlay-footer-nav {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-footer-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
}

.overlay-footer-nav__list a {
	font-size: 14px;
	color: #fff;
	opacity: 0.6;
	text-decoration: none;
}

.overlay-footer-nav__list a:hover {
	opacity: 1;
}

/* Navigation
--------------------------------------------- */
.top-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	padding: 15px 0 10px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
	display: flex;
	align-items: center;
}

/* Adjust nav position when header is shown */
.has-header .top-nav {
	top: 60px;
}

.top-nav__inner {
	display: flex;
	justify-content: flex-start;
	gap: 8px;
	padding: 0 16px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	flex: 1;
	scroll-behavior: smooth;
}

.top-nav__inner::after {
	content: "";
	flex-shrink: 0;
	width: 40px;
}

.top-nav__inner::-webkit-scrollbar {
	display: none;
}

/* Scroll Buttons */
.top-nav__scroll-btn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
	z-index: 10;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.top-nav__scroll-btn:hover {
	background: rgba(255, 255, 255, 0.25);
}

.top-nav__scroll-btn svg {
	width: 20px;
	height: 20px;
}

.top-nav__scroll-btn--left {
	margin-left: 10px;
	margin-right: -5px;
}

.top-nav__scroll-btn--right {
	margin-right: 10px;
	margin-left: -5px;
}

.top-nav__scroll-btn.hidden {
	opacity: 0;
	pointer-events: none;
}

/* Fade indicators */
.top-nav__fade {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 40px;
	pointer-events: none;
	z-index: 5;
	transition: opacity 0.2s ease;
}

.top-nav__fade--left {
	left: 42px;
	background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
	opacity: 0;
}

.top-nav__fade--right {
	right: 42px;
	background: linear-gradient(to left, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.top-nav__fade.hidden {
	opacity: 0;
}

/* Show scroll buttons on desktop */
@media (min-width: 700px) {
	.top-nav__scroll-btn {
		display: flex;
	}
	
	.top-nav__fade--left {
		left: 52px;
	}
	
	.top-nav__fade--right {
		right: 52px;
	}
}

.top-nav__tab {
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 500;
	opacity: 0.6;
	white-space: nowrap;
	cursor: pointer;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	position: relative;
	transition: opacity 0.3s ease, background 0.3s ease;
	border-radius: 20px;
	flex-shrink: 0;
}

.top-nav__tab:hover {
	opacity: 0.8;
	background: rgba(255, 255, 255, 0.15);
}

.top-nav__tab.active {
	opacity: 1;
	background: rgba(255, 255, 255, 0.2);
}

.top-nav__tab.active::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	height: 3px;
	background: #fff;
	border-radius: 2px;
}

/* Post Cards
--------------------------------------------- */
.post-card {
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	height: 100vh;
	height: 100dvh;
	max-height: 100vh;
	max-height: 100dvh;
	flex: 0 0 100vh;
	flex: 0 0 100dvh;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
	overflow: hidden;
}

.post-card__media {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
}

.post-card__media--image {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Ken Burns Zoom Effect */
@keyframes kenburns-zoom {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(var(--tiktok-zoom-scale, 1.1));
	}
	100% {
		transform: scale(1);
	}
}

@keyframes kenburns-zoom-alt {
	0% {
		transform: scale(var(--tiktok-zoom-scale, 1.1));
	}
	50% {
		transform: scale(1);
	}
	100% {
		transform: scale(var(--tiktok-zoom-scale, 1.1));
	}
}

@keyframes kenburns-pan {
	0% {
		transform: scale(var(--tiktok-zoom-scale, 1.1)) translate(0, 0);
	}
	25% {
		transform: scale(var(--tiktok-zoom-scale, 1.1)) translate(-1%, -1%);
	}
	50% {
		transform: scale(1) translate(0, 0);
	}
	75% {
		transform: scale(var(--tiktok-zoom-scale, 1.1)) translate(1%, 1%);
	}
	100% {
		transform: scale(var(--tiktok-zoom-scale, 1.1)) translate(0, 0);
	}
}

.has-zoom-effect .post-card__media--image {
	animation: kenburns-pan var(--tiktok-zoom-duration, 15s) ease-in-out infinite;
	will-change: transform;
}

/* Alternate animation for variety - every other card */
.has-zoom-effect .post-card:nth-child(even) .post-card__media--image {
	animation-name: kenburns-zoom-alt;
	animation-delay: calc(var(--tiktok-zoom-duration, 15s) * -0.5);
}

/* Different starting points for more variety */
.has-zoom-effect .post-card:nth-child(3n) .post-card__media--image {
	animation-delay: calc(var(--tiktok-zoom-duration, 15s) * -0.33);
}

.has-zoom-effect .post-card:nth-child(4n) .post-card__media--image {
	animation-delay: calc(var(--tiktok-zoom-duration, 15s) * -0.66);
}

/* Pause animation on hover for better UX */
.has-zoom-effect .post-card:hover .post-card__media--image {
	animation-play-state: paused;
}

.post-card__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.3) 0%,
		transparent 30%,
		transparent 50%,
		rgba(0, 0, 0, var(--tiktok-overlay-opacity, 0.7)) 100%
	);
	z-index: 2;
	pointer-events: none;
}

.post-card__content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 60px;
	padding: 20px;
	padding-bottom: 100px;
	z-index: 3;
}

.post-card__author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.post-card__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid #fff;
	object-fit: cover;
}

.post-card__username {
	font-weight: 700;
	font-size: 16px;
}

.post-card__title {
	font-family: var(--tiktok-title-font, inherit);
	font-size: var(--tiktok-card-title-size, 15px);
	font-weight: 400;
	line-height: 1.4;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-card__excerpt {
	font-family: var(--tiktok-body-font, inherit);
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.9;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Text Background for Better Readability
   Uses box-decoration-break for multi-line highlight effect */
.has-text-bg .post-card__title {
	display: block;
	margin-bottom: 10px;
}

.has-text-bg .post-card__title-text {
	background: var(--tiktok-text-bg, rgba(0, 0, 0, 0.6));
	padding: var(--tiktok-text-bg-padding, 8px) calc(var(--tiktok-text-bg-padding, 8px) * 1.25);
	border-radius: var(--tiktok-text-bg-radius, 4px);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	line-height: 1.9;
}

.has-text-bg .post-card__excerpt {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
	margin-bottom: 5px;
}

.has-text-bg .post-card__excerpt-text {
	background: var(--tiktok-text-bg, rgba(0, 0, 0, 0.6));
	padding: calc(var(--tiktok-text-bg-padding, 8px) * 0.75) var(--tiktok-text-bg-padding, 8px);
	border-radius: var(--tiktok-text-bg-radius, 4px);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	line-height: 2;
}

.post-card__category {
	display: inline-block;
	background: rgba(255, 255, 255, 0.2);
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 12px;
	margin-top: 10px;
	backdrop-filter: blur(10px);
}

.post-card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	backdrop-filter: blur(10px);
	transition: background 0.2s ease;
}

.post-card__link:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* Actions Sidebar
--------------------------------------------- */
.post-card__actions {
	position: absolute;
	right: 12px;
	bottom: 150px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	z-index: 4;
}

.action-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	transition: transform 0.2s ease;
	text-decoration: none;
}

.action-btn:hover {
	transform: scale(1.1);
}

.action-btn__icon {
	width: 45px;
	height: 45px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
}

.action-btn__icon svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.action-btn__count {
	font-size: 12px;
	font-weight: 500;
}

/* Like Button States */
.action-btn--like .icon-heart-filled {
	display: none;
	fill: #ff2d55;
}

.action-btn--like .icon-heart-outline {
	display: block;
	fill: currentColor;
}

.action-btn--like.liked .icon-heart-filled {
	display: block;
}

.action-btn--like.liked .icon-heart-outline {
	display: none;
}

.action-btn--like.liked .action-btn__icon {
	background: rgba(255, 45, 85, 0.2);
}

.action-btn--like.liked .action-btn__count {
	color: #ff2d55;
}

.action-btn--like.liking {
	pointer-events: none;
}

.action-btn--like.liking .action-btn__icon {
	animation: likePopIn 0.3s ease;
}

@keyframes likePopIn {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.3);
	}
	100% {
		transform: scale(1);
	}
}

/* No Posts
--------------------------------------------- */
.no-posts {
	width: 100%;
	height: 100vh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 40px;
	scroll-snap-align: start;
}

.no-posts__icon {
	width: 80px;
	height: 80px;
	margin-bottom: 20px;
	opacity: 0.5;
}

.no-posts__title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 10px;
}

.no-posts__text {
	font-size: 16px;
	opacity: 0.7;
}

/* Loading & Load More
--------------------------------------------- */
.load-more-container {
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	height: 100vh;
	height: 100dvh;
	flex: 0 0 100vh;
	flex: 0 0 100dvh;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
	background: var(--tiktok-bg-color, #000);
}

.load-more-btn {
	padding: 16px 48px;
	background: rgba(255, 255, 255, 0.15);
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 30px;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
}

.load-more-btn:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	transform: scale(1.05);
}

.load-more-btn:active {
	transform: scale(0.98);
}

.load-more-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.load-more-btn.loading {
	pointer-events: none;
}

.load-more-btn.loading::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 10px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	vertical-align: middle;
}

.load-more-text {
	font-size: 14px;
	opacity: 0.6;
}

.no-more-posts {
	width: 100%;
	min-height: 50vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px;
	scroll-snap-align: start;
}

.no-more-posts__text {
	font-size: 16px;
	opacity: 0.6;
}

/* Category Loading State */
.loading-category {
	grid-column: 1 / -1;
	min-height: 50vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Feed Widget Container - Card Style */
.feed-widget-container {
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	max-height: 100vh;
	max-height: 100dvh;
	scroll-snap-align: start;
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
}

.feed-widget-container::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 100%);
	pointer-events: none;
	z-index: 1;
}

/* Widget position: Bottom (default) */
.feed-widget-container .widget {
	position: absolute;
	bottom: 30px;
	left: 0;
	right: 0;
	padding: 20px;
	z-index: 2;
	max-height: 60%;
	overflow: hidden;
}

/* Widget position: Center (per-widget class) */
.feed-widget-container.widget-pos-center::before {
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

.feed-widget-container.widget-pos-center .widget {
	position: absolute;
	top: 50%;
	bottom: auto;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	max-height: 70%;
	text-align: center;
}

.feed-widget-container.widget-pos-center .widget-title {
	text-align: center;
}

.feed-widget-container.widget-pos-center .widget ul {
	display: inline-block;
	text-align: left;
}

.feed-widget-container.widget-pos-center .widget::after {
	display: none;
}

.feed-widget-container .widget::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 40px;
	background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
	pointer-events: none;
}

.widget-pos-center .feed-widget-container .widget::after {
	display: none;
}

.feed-widget-container .widget-title {
	font-family: var(--tiktok-title-font, inherit);
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 15px;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.feed-widget-container .widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.feed-widget-container .widget li {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.feed-widget-container .widget li:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.feed-widget-container .widget a {
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.4;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.feed-widget-container .widget a:hover {
	opacity: 0.8;
}

/* Truncate widget content - show max 5 items */
.feed-widget-container .widget li:nth-child(n+6) {
	display: none;
}

/* Widget label badge */
.feed-widget-badge {
	position: absolute;
	top: 80px;
	left: 20px;
	background: rgba(255, 255, 255, 0.15);
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, 0.8);
	z-index: 2;
}

/* Mobile: full-height feed widget */
@media (max-width: 699px) {
	.feed-widget-container {
		flex: 0 0 100vh;
		flex: 0 0 100dvh;
	}
}

/* Grid mode feed widget */
@media (min-width: 700px) {
	.feed-widget-container {
		min-height: auto;
		max-height: none;
		border-radius: 16px;
		aspect-ratio: 3 / 4;
	}

	.feed-widget-badge {
		top: 20px;
	}

	.feed-widget-container .widget {
		max-height: 70%;
	}

	/* Respect grid aspect ratios */
	.grid-ratio-9-16 .feed-widget-container {
		aspect-ratio: 9 / 16;
	}

	.grid-ratio-1-1 .feed-widget-container {
		aspect-ratio: 1 / 1;
	}

	.grid-ratio-4-3 .feed-widget-container {
		aspect-ratio: 4 / 3;
	}
}

/* Single Post Widget Areas */
.single-widget-area {
	margin: 30px 0;
	padding: 20px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 12px;
}

.single-widget-area .widget {
	margin-bottom: 20px;
}

.single-widget-area .widget:last-child {
	margin-bottom: 0;
}

.single-widget-area .widget-title {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 15px;
	color: #fff;
}

.loading-more {
	height: 100px;
	display: none;
	align-items: center;
	justify-content: center;
}

.loading__spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* Single Post
--------------------------------------------- */
.single-post {
	min-height: 100vh;
	background: var(--tiktok-bg-color, #000);
	padding-top: 60px;
	padding-bottom: 40px;
}

/* Single Post Header (for pages without site header) */
.single-post__header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: rgba(0, 0, 0, 0.95);
	backdrop-filter: blur(20px);
	display: flex;
	align-items: center;
	padding: 0 16px;
	z-index: 100;
	gap: 12px;
}

.admin-bar .single-post__header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .single-post__header {
		top: 46px;
	}
}

.single-post__back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	color: #fff;
	flex-shrink: 0;
	transition: background 0.2s ease;
}

.single-post__back:hover {
	background: rgba(255, 255, 255, 0.2);
}

.single-post__back svg {
	width: 20px;
	height: 20px;
}

.single-post__header-title {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1;
}

/* Single post uses site header now - adjust featured image */
.single-post__featured {
	width: 100%;
	max-height: 70vh;
	object-fit: cover;
	margin-top: 60px; /* Space for site header */
}

.has-header .single-post__featured {
	margin-top: 60px;
}

.single-post__content {
	padding: 24px 20px;
	max-width: 800px;
	margin: 0 auto;
}

/* If no featured image, add top padding */
.single-post:not(:has(.single-post__featured)) .single-post__content {
	padding-top: 80px;
}

.has-header .single-post:not(:has(.single-post__featured)) .single-post__content {
	padding-top: 80px;
}

.single-post__title {
	font-size: var(--tiktok-single-title-size, 28px);
	font-weight: 700;
	margin-bottom: 20px;
	line-height: 1.3;
}

.single-post__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
	font-size: 14px;
	opacity: 0.7;
	flex-wrap: wrap;
}

.single-post__meta a {
	display: flex;
	align-items: center;
	gap: 8px;
}

.single-post__meta img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

.single-post__body {
	font-size: 17px;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.9);
}

.single-post__body p {
	margin-bottom: 20px;
}

.single-post__body h2,
.single-post__body h3,
.single-post__body h4 {
	margin-top: 32px;
	margin-bottom: 16px;
	line-height: 1.3;
}

.single-post__body h2 {
	font-size: 24px;
}

.single-post__body h3 {
	font-size: 20px;
}

.single-post__body h4 {
	font-size: 18px;
}

.single-post__body img {
	margin: 24px 0;
	border-radius: 12px;
	max-width: 100%;
	height: auto;
}

.single-post__body a {
	color: var(--tiktok-accent-color, #69b4ff);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.single-post__body a:hover {
	opacity: 0.8;
}

.single-post__body ul,
.single-post__body ol {
	margin: 20px 0;
	padding-left: 24px;
}

.single-post__body li {
	margin-bottom: 8px;
}

.single-post__body blockquote {
	margin: 24px 0;
	padding: 20px 24px;
	background: rgba(255, 255, 255, 0.05);
	border-left: 4px solid rgba(255, 255, 255, 0.3);
	border-radius: 0 12px 12px 0;
	font-style: italic;
}

.single-post__body pre,
.single-post__body code {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	font-family: "SF Mono", Monaco, "Courier New", monospace;
	font-size: 14px;
}

.single-post__body code {
	padding: 2px 6px;
}

.single-post__body pre {
	padding: 16px;
	overflow-x: auto;
	margin: 20px 0;
}

.single-post__body pre code {
	padding: 0;
	background: none;
}

.single-post__body table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
}

.single-post__body th,
.single-post__body td {
	padding: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	text-align: left;
}

.single-post__body th {
	background: rgba(255, 255, 255, 0.05);
	font-weight: 600;
}

/* Post Navigation */
.single-post__nav {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.single-post__nav-grid {
	display: flex;
	justify-content: space-between;
	gap: 20px;
}

.single-post__nav-link {
	flex: 1;
	padding: 16px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	transition: background 0.2s ease;
}

.single-post__nav-link:hover {
	background: rgba(255, 255, 255, 0.1);
}

.single-post__nav-label {
	font-size: 12px;
	opacity: 0.6;
	margin-bottom: 6px;
}

.single-post__nav-title {
	font-size: 14px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Comments
--------------------------------------------- */
.comments-area {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-title {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 24px;
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.comment-body {
	margin-bottom: 24px;
	padding: 20px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 16px;
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.comment-author .avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.comment-author .fn {
	font-weight: 600;
	font-size: 15px;
}

.comment-metadata {
	font-size: 12px;
	opacity: 0.6;
}

.comment-content {
	font-size: 15px;
	line-height: 1.7;
}

.comment-content p {
	margin-bottom: 12px;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.reply {
	margin-top: 12px;
}

.reply a {
	font-size: 13px;
	opacity: 0.7;
}

.comment-list .children {
	list-style: none;
	margin: 16px 0 0 24px;
	padding-left: 16px;
	border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.comment-respond {
	margin-top: 40px;
	padding: 24px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 16px;
}

.comment-reply-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 20px;
}

.comment-reply-title small {
	font-size: 14px;
	font-weight: 400;
	margin-left: 12px;
}

.comment-reply-title small a {
	color: #ff6b6b;
}

.comment-form label {
	display: block;
	font-size: 14px;
	margin-bottom: 6px;
	opacity: 0.8;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
}

.comment-form textarea {
	min-height: 150px;
	resize: vertical;
}

.comment-form p {
	margin-bottom: 16px;
}

.comment-form .form-submit {
	margin-top: 20px;
	margin-bottom: 0;
}

.comment-form .submit {
	padding: 14px 28px;
	background: #fff;
	color: #000;
	border: none;
	border-radius: 25px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

/* Widgets
--------------------------------------------- */
.widget {
	margin: 0 0 1.5em;
}

.widget select {
	max-width: 100%;
}

/* Media
--------------------------------------------- */
.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
	border: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

.custom-logo-link {
	display: inline-block;
}

/* Captions
--------------------------------------------- */
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

.wp-caption-text {
	text-align: center;
}

/* Galleries
--------------------------------------------- */
.gallery {
	margin-bottom: 1.5em;
	display: grid;
	grid-gap: 1.5em;
}

.gallery-item {
	display: inline-block;
	text-align: center;
	width: 100%;
}

.gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
	grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
	grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
	grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
	display: block;
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/

/* Jetpack infinite scroll
--------------------------------------------- */
.infinite-scroll .posts-navigation,
.infinite-scroll.neverending .site-footer {
	display: none;
}

.infinity-end.neverending .site-footer {
	display: block;
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/

/* Accessibility
--------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

#primary[tabindex="-1"]:focus {
	outline: 0;
}

/* Alignments
--------------------------------------------- */
.alignleft {
	float: left;
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (min-width: 768px) {
	.single-post__title {
		font-size: 36px;
	}

	.single-post__body {
		font-size: 18px;
	}

	.single-post__content {
		padding: 32px;
	}
}

@media (min-width: 1024px) {
	.single-post__content {
		padding: 48px 32px;
	}

	.single-post__title {
		font-size: 42px;
	}
}

@media (max-width: 480px) {
	.single-post__title {
		font-size: 24px;
	}

	.single-post__body {
		font-size: 16px;
	}

	.single-post__meta {
		font-size: 13px;
	}

	.single-post__nav-grid {
		flex-direction: column;
	}

	.single-post__nav-link {
		text-align: left !important;
	}
}

/* Safe area insets */
@supports (padding-top: env(safe-area-inset-top)) {
	.top-nav {
		padding-top: calc(15px + env(safe-area-inset-top));
	}

	.post-card__content {
		padding-bottom: calc(100px + env(safe-area-inset-bottom));
	}
}

/*--------------------------------------------------------------
# Admin Bar Adjustments
--------------------------------------------------------------*/
/* Adjust for WordPress admin bar when logged in */
.admin-bar .top-nav {
	top: 32px;
}

.admin-bar .site-header {
	top: 32px;
}

.admin-bar .tiktok-app {
	padding-top: 32px;
}

.admin-bar .overlay-menu {
	top: 32px;
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

.admin-bar .post-card {
	min-height: calc(100vh - 32px);
	min-height: calc(100dvh - 32px);
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

.admin-bar .category-feed {
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
	.admin-bar .top-nav {
		top: 46px;
	}

	.admin-bar .site-header {
		top: 46px;
	}

	.admin-bar .tiktok-app {
		padding-top: 46px;
	}

	.admin-bar .overlay-menu {
		top: 46px;
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}

	.admin-bar .post-card {
		min-height: calc(100vh - 46px);
		min-height: calc(100dvh - 46px);
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}

	.admin-bar .category-feed {
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}
}

/*--------------------------------------------------------------
# Desktop Grid Layout
--------------------------------------------------------------*/

/* 
 * Automatic grid layout for tablet/desktop (700px+)
 * Mobile stays TikTok scroll-snap style
 */
@media (min-width: 700px) {
	/* Override body scroll behavior */
	body.tiktok-feed {
		overflow-y: auto;
		overflow-x: hidden;
		height: auto;
	}

	.tiktok-app {
		height: auto;
		min-height: 100vh;
		overflow: visible;
	}

	.categories-container {
		height: auto;
		overflow: visible;
		scroll-snap-type: none;
	}

	.category-feed {
		height: auto;
		overflow: visible;
		scroll-snap-type: none;
		display: grid;
		gap: 20px;
		padding: 80px 24px 40px;
		max-width: 1400px;
		margin: 0 auto;
	}

	/* Adjust padding when header is shown */
	.has-header .category-feed {
		padding-top: 140px;
	}

	/* Grid columns based on setting */
	.grid-cols-2 .category-feed {
		grid-template-columns: repeat(2, 1fr);
	}

	.grid-cols-3 .category-feed {
		grid-template-columns: repeat(3, 1fr);
	}

	.grid-cols-4 .category-feed {
		grid-template-columns: repeat(4, 1fr);
		gap: 16px;
	}

	/* Post card in grid */
	.post-card {
		min-height: auto;
		max-height: none;
		height: auto;
		flex: none;
		scroll-snap-align: none;
		scroll-snap-stop: normal;
		border-radius: 16px;
		overflow: hidden;
		transition: transform 0.3s ease, box-shadow 0.3s ease;
	}

	.post-card:hover {
		transform: translateY(-8px);
		box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
		z-index: 10;
	}

	/* Aspect ratios */
	.grid-ratio-9-16 .post-card {
		aspect-ratio: 9 / 16;
	}

	.grid-ratio-3-4 .post-card {
		aspect-ratio: 3 / 4;
	}

	.grid-ratio-1-1 .post-card {
		aspect-ratio: 1 / 1;
	}

	.grid-ratio-4-3 .post-card {
		aspect-ratio: 4 / 3;
	}

	/* Adjust content for grid cards */
	.post-card__content {
		padding: 16px;
		padding-bottom: 20px;
		right: 50px;
	}

	.post-card__title {
		font-size: 15px;
		-webkit-line-clamp: 2;
	}

	.post-card__excerpt {
		font-size: 13px;
		-webkit-line-clamp: 2;
	}

	.post-card__author {
		margin-bottom: 10px;
	}

	.post-card__avatar {
		width: 32px;
		height: 32px;
	}

	.post-card__username {
		font-size: 13px;
	}

	.post-card__category {
		font-size: 11px;
		padding: 4px 10px;
	}

	.post-card__link {
		padding: 8px 14px;
		font-size: 12px;
		margin-top: 10px;
	}

	/* Actions sidebar for grid */
	.post-card__actions {
		right: 10px;
		bottom: 70px;
		gap: 14px;
	}

	.action-btn__icon {
		width: 38px;
		height: 38px;
	}

	.action-btn__icon svg {
		width: 18px;
		height: 18px;
	}

	.action-btn__count {
		font-size: 10px;
	}

	/* Load more in grid - spans full width */
	.load-more-container {
		grid-column: 1 / -1;
		min-height: auto;
		height: auto;
		padding: 60px 20px;
		flex: none;
		background: transparent;
	}

	.no-posts {
		grid-column: 1 / -1;
		min-height: 40vh;
		height: auto;
	}

	/* Top navigation for grid */
	.top-nav {
		background: var(--tiktok-bg-color, #000);
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.top-nav__inner {
		max-width: none;
		padding: 0 8px;
	}

	.top-nav__tab {
		padding: 6px 14px;
		font-size: 13px;
	}

	/* On desktop grid, only show first category feed */
	.category-feed:not(:first-child) {
		display: none;
	}
}

/* Larger screens - more breathing room */
@media (min-width: 1200px) {
	.category-feed {
		gap: 24px;
		padding: 90px 40px 60px;
	}

	.grid-cols-3 .category-feed {
		max-width: 1200px;
	}

	.grid-cols-4 .category-feed {
		max-width: 1500px;
		gap: 20px;
	}

	.post-card__title {
		font-size: 16px;
	}

	.post-card__excerpt {
		font-size: 14px;
		-webkit-line-clamp: 3;
	}
}

/* 4-column specific adjustments */
@media (min-width: 700px) {
	.grid-cols-4 .post-card__content {
		padding: 12px;
		padding-bottom: 16px;
		right: 45px;
	}

	.grid-cols-4 .post-card__title {
		font-size: 13px;
	}

	.grid-cols-4 .post-card__excerpt {
		display: none;
	}

	.grid-cols-4 .post-card__avatar {
		width: 26px;
		height: 26px;
	}

	.grid-cols-4 .post-card__username {
		font-size: 11px;
	}

	.grid-cols-4 .post-card__category {
		font-size: 10px;
		padding: 3px 8px;
	}

	.grid-cols-4 .post-card__link {
		padding: 6px 10px;
		font-size: 11px;
	}

	.grid-cols-4 .post-card__actions {
		right: 6px;
		bottom: 55px;
		gap: 10px;
	}

	.grid-cols-4 .action-btn__icon {
		width: 32px;
		height: 32px;
	}

	.grid-cols-4 .action-btn__icon svg {
		width: 16px;
		height: 16px;
	}

	.grid-cols-4 .action-btn__count {
		font-size: 9px;
	}
}

/* Text Background Grid Adjustments */
@media (min-width: 700px) {
	.has-text-bg .post-card__title-text {
		line-height: 1.7;
		padding: calc(var(--tiktok-text-bg-padding, 8px) * 0.6) calc(var(--tiktok-text-bg-padding, 8px) * 0.8);
	}

	.has-text-bg .post-card__excerpt-text {
		line-height: 1.8;
		padding: calc(var(--tiktok-text-bg-padding, 8px) * 0.5) calc(var(--tiktok-text-bg-padding, 8px) * 0.7);
	}

	/* 4-column: hide excerpt even with text bg */
	.has-text-bg.grid-cols-4 .post-card__excerpt {
		display: none;
	}
}
