/*
Theme Name: Flavor
Theme URI: https://example.com/flavor
Author: Custom
Description: A bold, black-background video blog theme with masonry layout and Vimeo integration.
Version: 1.0.24
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flavor
Tags: black, dark, video, blog, masonry
*/

/* ========================================================================
   RESET & BASE
   ======================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #000000;
  --color-surface: #111111;
  --color-surface-hover: #1a1a1a;
  --color-border: #222222;
  --color-text: #ffffff;
  --color-text-muted: #999999;
  --color-accent: #ffffff;
  --font-heading: 'Oswald', 'Arial Black', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --container-max: 1400px;
  --container-narrow: 900px;
  --gap: 24px;
  --radius: 4px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.7;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/*
 * Do not set height:auto or display:block on all iframes — it fights WP/core
 * responsive embeds (absolute + height:100%) and can make unrelated embeds
 * (admin bar, analytics) behave oddly. Scope fluid rules to content/embeds.
 */
iframe {
  max-width: 100%;
}

.post-card__video iframe,
.single-post-video iframe,
.single-post-content iframe,
.wp-block-embed.is-type-video .wp-block-embed__wrapper iframe {
  display: block;
}

/* ========================================================================
   TYPOGRAPHY
   ======================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

h4 {
  font-size: 1.2rem;
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ========================================================================
   LAYOUT
   ======================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ========================================================================
   HEADER
   ======================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  width: 100%;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  padding: 16px var(--gap);
  box-sizing: border-box;
}

.header-left {
  flex: 0 0 auto;
  line-height: 0;
  margin: 0;
  padding: 0;
}

.header-left .custom-logo-link,
.header-left a {
  display: block;
  line-height: 0;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1;
  pointer-events: auto;
  margin: 0;
  padding: 0 8px;
}

.header-center a {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  text-decoration: none;
}

.header-right {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.header-right a {
  font-family: var(--font-body);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--color-text);
}

/* Legacy: if any template wraps header content in .container */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 520px) {
  .header-center {
    display: none;
  }
}

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

.site-branding .custom-logo,
.header-left .custom-logo {
  height: 40px;
  width: auto;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.site-title a {
  color: var(--color-text);
}

.site-description {
  display: none;
}

/* Navigation */

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-navigation a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--color-text);
  opacity: 1;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.98);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
  }

  .main-navigation.toggled ul {
    display: flex;
  }
}

/* ========================================================================
   Home — tools link (blog / posts index, page 1)
   ======================================================================== */

.home-tools-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--color-border);
}

.home-tools-cta__text {
  margin: 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.home-tools-cta__link {
  display: inline-block;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent, #c9a227);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 18px;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.home-tools-cta__link:hover,
.home-tools-cta__link:focus-visible {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

/* ========================================================================
   MASONRY GRID (Home / Archive)
   ======================================================================== */

.masonry-grid {
  columns: 3;
  column-gap: var(--gap);
  padding: 60px 0;
}

@media (max-width: 1024px) {
  .masonry-grid {
    columns: 2;
  }
}

@media (max-width: 600px) {
  .masonry-grid {
    columns: 1;
  }
}

/* ========================================================================
   POST CARD
   ======================================================================== */

.post-card {
  break-inside: avoid;
  margin-bottom: var(--gap);
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(255, 255, 255, 0.04);
}

/*
 * Post card video. Vimeo uses .flavor-embed-responsive (same idea as Bootstrap
 * .embed-responsive-16by9 + .embed-responsive-item on websitetalkingheads.com).
 * oEmbed wrappers (padding div + iframe): width only; do not reposition iframe.
 */
.post-card__video {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
}

.post-card__video .video-embed {
  width: 100%;
}

.post-card__video .video-embed iframe {
  border: 0;
  max-width: 100%;
}

/*
 * Intrinsic 16:9 box + absolute iframe (Bootstrap 3 embed-responsive pattern).
 * ::before + padding-top fails in CSS columns (masonry-grid): height goes to 0 and Vimeo disappears.
 * height:0 + padding-bottom:% is stable in multi-column layouts.
 */
.flavor-embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
}

.flavor-embed-responsive--16by9 {
  height: 0;
  padding-bottom: 56.25%;
}

.flavor-embed-responsive__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

/* YouTube / other: bare iframe only, no .flavor-embed-responsive */
.post-card__video .video-embed:not(.flavor-embed-responsive)>iframe:only-child {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.post-card__video .wp-block-embed__wrapper {
  width: 100%;
}

/* Thumbnail fallback (when no embed on archive) */
.post-card__thumb {
  position: relative;
  overflow: hidden;
  background: #000;
}

.post-card__thumb img {
  width: 100%;
  display: block;
  transition: transform var(--transition), opacity var(--transition);
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.03);
  opacity: 0.8;
}

.post-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  pointer-events: none;
}

.post-card__play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.post-card:hover .post-card__play {
  background: rgba(255, 255, 255, 0.25);
  border-color: #fff;
}

/* Card body */
.post-card__body {
  padding: 20px;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.post-card__category a {
  color: var(--color-text);
  font-weight: 600;
}

.post-card__title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.25;
}

.post-card__title a {
  color: var(--color-text);
}

.post-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/*
 * Tools hub (/tools/): Icons8 icon in same visual slot as video/thumbnail.
 */
.post-card__thumb--tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 24px;
  background: var(--color-surface);
}

.post-card__thumb--tool-icon img {
  width: auto;
  height: auto;
  max-width: min(360px, 92%);
  max-height: min(288px, 88%);
  object-fit: contain;
}

/* ========================================================================
   SINGLE POST
   ======================================================================== */

.single-post-header {
  padding: 40px 0 40px;
  text-align: center;
}

.single-post-header .post-card__meta {
  justify-content: center;
  margin-bottom: 16px;
}

.single-post-header h1 {
  max-width: 800px;
  margin: 0 auto;
}

.single-post-video {
  max-width: 1000px;
  margin: 0 auto 48px;
  border-radius: var(--radius);
  overflow: hidden;
}

.single-post-video .video-embed {
  position: relative;
  width: 100%;
  background: #000;
}

.single-post-video .video-embed iframe {
  border: 0;
  max-width: 100%;
}

.single-post-video .video-embed:not(.flavor-embed-responsive)>iframe:only-child {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.single-post-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-bottom: 80px;
}

.single-post-content p {
  margin-bottom: 1.5em;
  font-size: 1.05rem;
}

.single-post-content h2,
.single-post-content h3 {
  color: var(--color-text);
  margin: 2em 0 0.8em;
}

.single-post-content blockquote {
  border-left: 3px solid var(--color-text);
  padding-left: 24px;
  margin: 2em 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.single-post-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post-content .wp-caption img,
.single-post-content p.cta img {
  width: 100%;
  max-width: 600px;
  height: auto;
}

/* WordPress embeds */
.single-post-content .wp-block-embed {
  margin: 2em 0;
}

.single-post-content .wp-block-embed__wrapper {
  position: relative;
  padding-top: 56.25%;
}

.single-post-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ========================================================================
   CTA promos (linked thumbnail + caption in post body)
   ======================================================================== */

.cta .wp-caption {
  width: auto !important;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.cta img {
  width: 100%;
  height: auto;
}

/* ========================================================================
   POST NAVIGATION
   ======================================================================== */

.post-navigation {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  gap: var(--gap);
}

.post-navigation a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.post-navigation a:hover {
  color: var(--color-text);
  opacity: 1;
}

.post-navigation .nav-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}

/* ========================================================================
   POST PROMO BANNER (random outbound promo below post navigation)
   ======================================================================== */

.post-promo-banner {
  margin: 0 0 48px;
  text-align: center;
}

.post-promo-banner__link {
  display: inline-block;
  max-width: min(100%, 728px);
  line-height: 0;
}

.post-promo-banner__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* ========================================================================
   PAGINATION
   ======================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 40px 0 80px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--color-surface);
  border-color: var(--color-text-muted);
  opacity: 1;
}

.pagination .current {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* ========================================================================
   PAGE TEMPLATE
   ======================================================================== */

.page-header {
  padding: 40px 0 40px;
  text-align: center;
}

.page-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-bottom: 80px;
}

.page-content p {
  margin-bottom: 1.5em;
}

.lists-hub-intro {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.lists-hub-tabs {
  padding-bottom: 80px;
  max-width: min(1100px, 100%);
  margin: 0 auto;
}

.lists-hub-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--gap);
}

.lists-hub-tab {
  display: block;
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition), opacity var(--transition);
}

.lists-hub-tab:hover {
  color: var(--color-text);
  opacity: 1;
}

.lists-hub-tab-active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.lists-hub-tab-panel {
  display: none;
}

.lists-hub-tab-panel-active {
  display: block;
}

.lists-hub-page .seovideo-tool-panel {
  background: var(--color-surface);
  border-color: var(--color-border);
}

.lists-hub-page .seovideo-tool-grid textarea,
.lists-hub-page .seovideo-tool-grid input {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-sizing: border-box;
}

.lists-hub-page .seovideo-tool-grid label {
  color: var(--color-text-muted);
}

/*
 * Plugin list tools emit theme .button / .button-green etc. (same as template-textcleaner.php).
 * WP/global-styles can flatten gradients — mirror .page-content button.button guard.
 */
.seovideo-tool-panel button.button,
.seovideo-tool-panel button.button:focus {
  background-image: linear-gradient(var(--button-top, rgb(214, 202, 254)), var(--button-bottom, rgb(158, 129, 254))) !important;
  background-color: transparent !important;
}

/* ========================================================================
   TOOLS PAGE — home-style post-card + CSS grid (not column masonry)
   ======================================================================== */

.page-tools .page-content {
  max-width: min(1160px, 100%);
}

.page-tools .sve-tools-hub__intro {
  max-width: 42rem;
  margin: 0 auto 0.75rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-text);
}

.page-tools .sve-tools-hub__lead {
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.page-tools .sve-tools-hub .masonry-grid {
  columns: unset;
  column-gap: unset;
  padding: 60px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
  grid-auto-rows: minmax(0, auto);
}

.page-tools .sve-tools-hub .masonry-grid .post-card {
  margin-bottom: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-tools .sve-tools-hub .masonry-grid .post-card .post-card__thumb--tool-icon {
  flex-shrink: 0;
  /* Same vertical start for every icon in the row (center was shifting shorter icons). */
  align-items: flex-start;
  justify-content: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

.page-tools .sve-tools-hub .masonry-grid .post-card .post-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Tools hub: keep every card excerpt to two lines (Scripts copy = longest target). */
.page-tools .sve-tools-hub .masonry-grid .post-card .post-card__excerpt {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (max-width: 1024px) {
  .page-tools .sve-tools-hub .masonry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .page-tools .sve-tools-hub .masonry-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.page-tools .sve-tools-hub .sve-tools-icons8 {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.page-tools .sve-tools-hub .sve-tools-icons8 a {
  color: var(--color-text-muted);
}

.page-tools .sve-tools-hub .sve-tools-icons8 a:hover {
  color: var(--color-text);
  opacity: 1;
}

/* ========================================================================
   LISTS TOOL — prefix / suffix / space buttons (HTML or JS wrapper)
   ======================================================================== */

.lists-tools-buttons,
.list-tools-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.lists-tools-buttons > *,
.list-tools-buttons > * {
  flex: 0 0 auto;
}

.lists-tools-buttons button,
.list-tools-buttons button {
  flex: 0 0 auto;
}

/* Two columns (~1 : 2) — generic panels. */
.lists-tools-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 12px 16px;
  align-items: start;
  margin-bottom: 12px;
}

/* Lists page: three textareas on one desktop row (prefix, list, result). */
.lists-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 2fr);
  gap: 12px 16px;
  align-items: start;
  margin-bottom: 12px;
}

.lists-tools-panels > .lists-tools-panel,
.lists-tools-grid > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Full-width Result block below the pair — wrap in .lists-tools-result-panel */
.lists-tools-result-panel {
  width: 100%;
  margin-bottom: 4px;
}

.lists-tools-grid > .lists-tools-result-panel {
  width: auto;
  margin-top: 0 !important;
  margin-bottom: 0;
}

.lists-tools-panel-title,
.lists-tools-result-panel > h3:first-child,
.lists-tools-panels .lists-tools-panel > h3:first-child,
.lists-tools-grid > div > h3:first-child {
  font-size: 1rem;
  margin: 0 0 8px;
}

@media (max-width: 768px) {
  .lists-tools-panels,
  .lists-tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================
   TEXTCLEANER PAGE
   ======================================================================== */

.page-content {
  max-width: 1000px;
}

.textcleaner-intro {
  margin-bottom: 16px;
}

.textcleaner-panels {
  display: grid;
  gap: 12px;
}

.textcleaner-panel-title {
  font-size: 1rem;
  margin: 0 0 8px;
}

.textcleaner-textarea,
#tc-input,
#lists-modifier,
#lists-input,
#lists-output {
  width: 100%;
  min-height: 174px;
  resize: vertical;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #0b0b0b;
  color: var(--color-text);
  padding: 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
}

#lists-output {
  min-height: 260px;
}

#lists-modifier,
#lists-input {
  min-height: 260px;
}

.textcleaner-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.textcleaner-actions-bottom {
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

button,
button:focus {
  font-size: 17px;
  padding: 10px 25px;
  border-radius: 0.7rem;
  background-image: linear-gradient(var(--button-top, rgb(214, 202, 254)), var(--button-bottom, rgb(158, 129, 254)));
  border: 2px solid rgb(50, 50, 50);
  border-bottom: 5px solid rgb(50, 50, 50);
  box-shadow: 0px 0px 0.75px 0px var(--button-shadow, rgb(158, 129, 254)) !important;
  transform: translate(0, -3px);
  cursor: pointer;
  transition: 0.2s;
  transition-timing-function: linear;
  color: var(--button-text, #ffffff);
}

button:active {
  transform: translate(0, 0);
  border-bottom: 2px solid rgb(50, 50, 50);
}

button:hover {
  filter: brightness(1.22) saturate(1.2);
  transform: translate(0, -5px);
}

.button-danger {
  --button-top: #cf4e4e;
  --button-bottom: #8b1e1e;
  --button-shadow: #8b1e1e;
}

.button-primary {
  --button-top: #5f95e5;
  --button-bottom: #1f5fbf;
  --button-shadow: #1f5fbf;
}

.button-copy {
  --button-top: #3ef5d4;
  --button-bottom: #00b894;
  --button-shadow: #00b894;
  --button-text: #04251f;
}

.button-green {
  --button-top: #53b978;
  --button-bottom: #1b7f3a;
  --button-shadow: #1b7f3a;
}

.button-drkblue {
  --button-top: #4f78c3;
  --button-bottom: #1f3d7a;
  --button-shadow: #1f3d7a;
}

.button-purple {
  --button-top: #8b6bd1;
  --button-bottom: #5d3c99;
  --button-shadow: #5d3c99;
}

.button-orange {
  --button-top: #df9957;
  --button-bottom: #b8641b;
  --button-shadow: #b8641b;
}

.button-blue {
  --button-top: #63a0e3;
  --button-bottom: #2b6cb0;
  --button-shadow: #2b6cb0;
}

/*
 * WP theme.json / global-styles often sets plain button backgrounds after theme CSS,
 * which strips gradients and makes tools look “solid black”. Force gradients inside tool UI.
 */
.page-content button.button,
.page-content button.button:focus {
  background-image: linear-gradient(var(--button-top, rgb(214, 202, 254)), var(--button-bottom, rgb(158, 129, 254))) !important;
  background-color: transparent !important;
}

/* ========================================================================
   TEXT COUNTERS PAGE
   ======================================================================== */

.text-counters-panel {
  margin-bottom: 8px;
}

.text-counters-label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--color-text-muted);
}

.text-counters-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 16px;
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.text-counters-stat dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 4px;
}

.text-counters-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.75rem;
}

.text-counters-stat dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

/* ========================================================================
   FOOTER
   ======================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 40px var(--gap);
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-nav {
  margin-bottom: 16px;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-nav a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.footer-nav a:hover {
  color: var(--color-text);
  opacity: 1;
}

/* ========================================================================
   404
   ======================================================================== */

.error-404 {
  text-align: center;
  padding: 120px 0;
}

.error-404 h1 {
  font-size: clamp(4rem, 10vw, 8rem);
  margin-bottom: 16px;
}

.error-404 p {
  margin-bottom: 32px;
}

.error-404 a.btn {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid var(--color-text);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition);
}

.error-404 a.btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
  opacity: 1;
}

/* ========================================================================
   WORDPRESS CORE OVERRIDES
   ======================================================================== */

.wp-block-embed.is-type-video .wp-block-embed__wrapper {
  position: relative;
  padding-top: 56.25%;
}

.wp-block-embed.is-type-video .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.alignwide {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* Screen reader text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}