/*
Theme Name: ATEM Anniversary
Theme URI: 
Author: Steve Marty | WestWorks Digital
Author URI: 
Description: Custom theme for ATEM's 50th Anniversary website
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: starter-block-theme-v4
Text Domain: atem-anniversary
Tags: 
*/

/*
 * ATEM — Theme Stylesheet
 * Association for Tertiary Education Management
 *
 * This file is the companion to theme.json.
 * theme.json handles: colour palette, font sizes, spacing scale,
 * element defaults (headings, links, buttons).
 *
 * This file handles: custom properties, button variants,
 * utility classes, form styles, and anything theme.json cannot express.
 *
 * Theme Name:  ATEM
 * Description: Association for Tertiary Education Management
 * Version:     1.0.0
 */

/* ─── Custom properties ──────────────────────────────────────── */

* {
  box-sizing: border-box;
}

:root {
  /* 50th Anniversary palette (extracted from banner) */
  --atem-pink: #e5097f;
  --atem-pink-hover: #c2006b;
  --atem-pink-light: #fce9f3;
  --atem-violet: #5b3fa0;
  --atem-violet-hover: #4a2f8a;
  --atem-bright-green: #62bb46;
  --atem-banner-gradient: linear-gradient(90deg, #5b3fa0 0%, #0085c7 20%, #00c4bc 40%, #62bb46 60%, #f7aa0c 80%, #e5097f 100%);
  --atem-rainbow: linear-gradient(90deg,#6B3EA1,#2F6BB4,#00A89C,#52B043,#F5C518,#F79319,#E8177A);

  /* Shadow */
  --atem-shadow-sm: 0 2px 12px rgba(0,0,0,0.07);
  --atem-shadow-md: 0 5px 18px rgba(0,0,0,0.07);
  --atem-shadow-hover: 0 10px 32px rgba(0,0,0,0.13);

  /* Major palette */
  --atem-teal: #00a69b;
  --atem-teal-hover: #008f86;
  --atem-teal-active: #007a72;
  --atem-teal-light: #c9f2dd;
  --atem-teal-pastel: #e9faf2;

  --atem-lime: #bfd800;
  --atem-lime-light: #bcf2a5;
  --atem-lime-pastel: #f4f7e2;

  --atem-tangerine: #f7aa0c;
  --atem-tangerine-light: #ffd45e;
  --atem-tangerine-pastel: #fffee0;

  --atem-valencia: #f0501d;
  --atem-valencia-hover: #d04318;
  --atem-valencia-light: #ffd4a6;
  --atem-valencia-pastel: #ffefe0;

  --atem-plum: #9d1394;
  --atem-plum-light: #c897e3;
  --atem-plum-pastel: #feedff;

  --atem-indigo: #4f5ddb;
  --atem-indigo-light: #b2cff4;
  --atem-indigo-pastel: #e8f0fc;

  --atem-black: #000000;
  --atem-gray: #6e6e6e;
  --atem-gray-light: #b4b2a9;
  --atem-white: #ffffff;

  /* Minor (screened) palette */
  --atem-minor-teal: #c9f2dd;
  --atem-minor-lime: #bcf2a5;
  --atem-minor-sky: #87daed;
  --atem-minor-periwinkle: #b2cff4;
  --atem-minor-violet: #c897e3;
  --atem-minor-pink: #f97099;
  --atem-minor-blush: #fcbce7;
  --atem-minor-peach: #ffd4a6;
  --atem-minor-yellow: #ffd45e;
  --atem-minor-lemon: #fef56f;
  --atem-minor-cream: #fdfead;

  /* Pastel palette */
  --atem-pastel-teal: #e9faf2;
  --atem-pastel-blue: #e8f0fc;
  --atem-pastel-pink: #feedff;
  --atem-pastel-peach: #ffefe0;
  --atem-pastel-lime: #fffee0;
  --atem-pastel-green: #f4f7e2;

  /* Typography */
  --atem-font-primary: "Linotype Veto", Arial, Helvetica, sans-serif;
  --atem-font-alternate: Arial, Helvetica, sans-serif;
  --atem-lh-body: 1.7;
  --atem-lh-heading: 1.2;
  --atem-ls-label: 0.06em;

  /* Borders & radii */
  --atem-radius-sm: 4px;
  --atem-radius-md: 6px;
  --atem-radius-lg: 10px;
  --atem-radius-pill: 999px;

  /* Focus ring */
  --atem-focus-ring: 2.5px solid var(--atem-teal);
  --atem-focus-offset: 2px;

  /* Button heights */
  --atem-btn-h-sm: 30px;
  --atem-btn-h-md: 38px;
  --atem-btn-h-lg: 46px;
  --atem-btn-px-sm: 12px;
  --atem-btn-px-md: 18px;
  --atem-btn-px-lg: 24px;
}

/* ─── Focus ring ─────────────────────────────────────────────── */
:focus-visible {
  outline: var(--atem-focus-ring);
  outline-offset: var(--atem-focus-offset);
}

/* ─── Base typography ─────────────────────────────────────────── */
body {
  font-family: var(--atem-font-primary);
  line-height: var(--atem-lh-body);
  color: var(--atem-black);
}

/* h2 teal override is in theme.json but repeated here as fallback */
h2 {
  color: var(--atem-teal);
}



/* ─── Buttons ────────────────────────────────────────────────── */

/* Shared base — overrides WP default button */
.wp-block-button__link,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--atem-btn-h-md);
  padding: 0 var(--atem-btn-px-md);
  border-radius: var(--atem-radius-md);
  font-family: var(--atem-font-primary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
  text-decoration: none;
}

/* Primary (default) */
.wp-block-button__link,
.wp-element-button,
.wp-block-button.is-style-primary .wp-block-button__link {
  background-color: var(--atem-teal);
  color: var(--atem-white);
  border: none;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
.wp-block-button.is-style-primary .wp-block-button__link:hover {
  background-color: var(--atem-teal-hover);
  color: var(--atem-white);
}

.wp-block-button__link:active,
.wp-element-button:active,
.wp-block-button.is-style-primary .wp-block-button__link:active {
  background-color: var(--atem-teal-active);
  color: var(--atem-white);
  transform: scale(0.98);
}

/* Secondary (outline) */
.wp-block-button.is-style-secondary .wp-block-button__link {
  background-color: transparent;
  color: var(--atem-teal);
  border: 1.5px solid var(--atem-teal);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover {
  background-color: var(--atem-teal-pastel);
  color: var(--atem-teal);
}

.wp-block-button.is-style-secondary .wp-block-button__link:active {
  background-color: var(--atem-teal-light);
  transform: scale(0.98);
}

/* Ghost */
.wp-block-button.is-style-ghost .wp-block-button__link {
  background-color: transparent;
  color: var(--atem-gray);
  border: 1.5px solid var(--atem-gray-light);
}

.wp-block-button.is-style-ghost .wp-block-button__link:hover {
  background-color: #f5f5f5;
  color: var(--atem-black);
}

/* Destructive */
.wp-block-button.is-style-destructive .wp-block-button__link {
  background-color: var(--atem-valencia);
  color: var(--atem-white);
  border: none;
}

.wp-block-button.is-style-destructive .wp-block-button__link:hover {
  background-color: var(--atem-valencia-hover);
  color: var(--atem-white);
}

/* Sizes */
.wp-block-button.is-style-small .wp-block-button__link {
  height: var(--atem-btn-h-sm);
  padding: 0 var(--atem-btn-px-sm);
  font-size: 0.8125rem;
}

.wp-block-button.is-style-large .wp-block-button__link {
  height: var(--atem-btn-h-lg);
  padding: 0 var(--atem-btn-px-lg);
  font-size: 1.0625rem;
}

/* ─── Form elements ──────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-family: var(--atem-font-primary);
  font-size: 1rem;
  color: var(--atem-black);
  background-color: var(--atem-white);
  border: 1.5px solid var(--atem-gray-light);
  border-radius: var(--atem-radius-md);
  transition: border-color 0.15s ease;
  appearance: none;
}

textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--atem-gray);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--atem-teal);
  box-shadow: var(--atem-shadow-sm);
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Validation states */
.is-error input,
.is-error textarea,
.is-error select,
input.is-error,
textarea.is-error {
  border-color: var(--atem-valencia);
}

.form-error-message {
  font-size: 0.6875rem;
  color: var(--atem-valencia);
  margin-top: 4px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--atem-black);
}

/* ─── Badges & tags ──────────────────────────────────────────── */
.atem-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--atem-radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.atem-badge--teal {
  background: var(--atem-teal-pastel);
  color: #005c56;
}
.atem-badge--lime {
  background: #eef6b0;
  color: #5a6800;
}
.atem-badge--tangerine {
  background: var(--atem-tangerine-pastel);
  color: #7a5100;
}
.atem-badge--valencia {
  background: var(--atem-valencia-pastel);
  color: #7a2800;
}
.atem-badge--plum {
  background: var(--atem-plum-pastel);
  color: #5c0e5c;
}
.atem-badge--indigo {
  background: var(--atem-indigo-pastel);
  color: #2a3499;
}
.atem-badge--gray {
  background: #f0efea;
  color: var(--atem-gray);
}

/* ─── Utility classes ────────────────────────────────────────── */

/* Text colours */
.has-teal-color {
  color: var(--atem-teal) !important;
}
.has-lime-color {
  color: var(--atem-lime) !important;
}
.has-tangerine-color {
  color: var(--atem-tangerine) !important;
}
.has-valencia-color {
  color: var(--atem-valencia) !important;
}
.has-plum-color {
  color: var(--atem-plum) !important;
}
.has-indigo-color {
  color: var(--atem-indigo) !important;
}
.has-gray-color {
  color: var(--atem-gray) !important;
}

/* Section label / overline */
.atem-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--atem-ls-label);
  text-transform: uppercase;
  color: var(--atem-teal);
}

/* ─── Block: Quote ───────────────────────────────────────────── */
.wp-block-quote {
  border-left: 4px solid var(--atem-teal);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--atem-gray);
}

.wp-block-quote cite {
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 500;
  color: var(--atem-black);
}

/* ─── Block: Separator ───────────────────────────────────────── */
.wp-block-separator {
  border-color: var(--atem-gray-light);
  border-top-width: 1px;
}

.wp-block-separator.is-style-wide {
  border-color: var(--atem-teal);
  border-top-width: 2px;
}

/* ─── Block: Table ───────────────────────────────────────────── */
.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}

.wp-block-table th {
  background-color: var(--atem-teal);
  color: var(--atem-white);
  font-weight: 500;
  padding: 10px 14px;
  text-align: left;
}

.wp-block-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e8e8e8;
}

.wp-block-table tr:last-child td {
  border-bottom: none;
}

.wp-block-table.is-style-stripes tr:nth-child(odd) td {
  background-color: var(--atem-teal-pastel);
}

/* ─── Block: Cover (teal key colour) ────────────────────────── */
.wp-block-cover.is-style-teal-key {
  background-color: var(--atem-teal);
}

.wp-block-cover.is-style-teal-key .wp-block-cover__inner-container {
  color: var(--atem-white);
}

.wp-block-cover.is-style-teal-key h1,
.wp-block-cover.is-style-teal-key h2,
.wp-block-cover.is-style-teal-key h3 {
  color: var(--atem-white);
}

/* ─── 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;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  background-color: var(--atem-teal);
  color: var(--atem-white);
  font-weight: 500;
  left: 6px;
  padding: 8px 16px;
  position: absolute;
  top: -40px;
  z-index: 9999;
  border-radius: 0 0 var(--atem-radius-md) var(--atem-radius-md);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* ─── Site header ────────────────────────────────────────────────── */
.atem-nav {
  min-height: 54px;
  border-bottom: 1px solid #e0e0e0;
}
.atem-nav a {
        text-decoration: none; color: var(--mid);
      font-size: 15px; font-weight: 500;
      transition: color 0.18s;
      padding-bottom: 2px;
      border-bottom: 2px solid transparent;
}
.atem-site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 0 48px;
}

.atem-site-header .wp-block-site-title a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 700;
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.atem-hero {
  text-align: center;
  overflow: hidden;
}

/* Banner image: edge-to-edge, no extra margin */
.atem-hero__banner {
  margin: 0 !important;
  display: block;
  line-height: 0;
}

.atem-hero__banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Rainbow stripe separator — is-style-rainbow-stripe */
.wp-block-separator.is-style-rainbow-stripe {
  height: 6px;
  border: none !important;
  background: var(--atem-banner-gradient);
  background-image: var(--atem-banner-gradient) !important;
  width: 100%;
  max-width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  opacity: 1;
}

/* Hero CTA button — hot pink */
.atem-hero__cta .wp-block-button__link {
  background-color: var(--atem-pink);
  color: #fff;
  border-color: var(--atem-pink);
}

.atem-hero__cta .wp-block-button__link:hover,
.atem-hero__cta .wp-block-button__link:focus {
  background-color: var(--atem-pink-hover);
  border-color: var(--atem-pink-hover);
}

/* ─── Section heading accents ────────────────────────────────────── */

/* Gradient underline on section h2s */
.atem-gallery-section .wp-block-heading,
.atem-form-heading {
  position: relative;
  padding-bottom: 14px;
}

.atem-gallery-section .wp-block-heading::after,
.atem-form-heading::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--atem-banner-gradient);
}

/* Gallery section: subtle rainbow top border */


.atem-gallery-section {
  border-top: 4px solid transparent;
  border-image: var(--atem-banner-gradient) 1;
}

/* Form section: subtle rainbow top border */
.atem-form-section {
  border-top: 4px solid transparent;
  border-image: var(--atem-banner-gradient) 1;
}

/* Submit button: hot pink to match hero CTA */
.atem-submit-btn {
  background-color: var(--atem-pink) !important;
  border-color: var(--atem-pink) !important;
  color: #fff !important;
}

.atem-submit-btn:hover,
.atem-submit-btn:focus {
  background-color: var(--atem-pink-hover) !important;
  border-color: var(--atem-pink-hover) !important;
}


/* ─── Gallery section ────────────────────────────────────────────── */
.atem-gallery {
  max-width:none;
}

.atem-gallery-section h2 {
  margin-bottom: 0.25rem;
}

/* Masonry: CSS-columns approach, 3 cols desktop → 2 → 1 */
.atem-masonry {
  column-count: 4;
  column-gap: 20px;
}

@media (max-width: 1200px) {
  .atem-masonry { column-count: 3; }
}

@media (max-width: 980px) {
  .atem-masonry { column-count: 2; }
}

@media (max-width: 540px) {
  .atem-masonry { column-count: 1; }
}

/* ─── Submission card ────────────────────────────────────────────── */
@keyframes atem-card-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.atem-card--fade-in {
  animation: atem-card-fadein 0.35s ease-out both;
}

.atem-card {
  display: inline-block; /* required for CSS columns */
  width: 100%;
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--atem-radius-lg);
  background: #ffffff;
  border: 1px solid #d0d0d0;
  overflow: hidden;
  vertical-align: top;
  box-shadow: var(--atem-shadow-sm);
  transition: all 0.25s ease;
}
.atem-card:hover {
  transition: all 0.25s ease;
  transform: translateY(-3px);
}

.atem-card p {
  padding:0;
  margin:0;
}

.atem-card__quote-header {
  display:flex;
  gap:20px;
  position:relative;
}

.atem-card .q-mark {
  position:absolute;
  right:15px;
  bottom:0;
  font-size: 84px;
        font-family: Georgia, serif;
line-height: 0.75;
}

.atem-card__media {
  width: 100%;
  overflow: hidden;
  background: #e8e8e8;
}

.atem-card__media img.atem-card__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.atem-card__media--placeholder,
.atem-card__media-placeholder--video {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: #aaa;
}

/* YouTube thumbnail card */
.atem-card__video-thumb {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.atem-card__play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  transition: background 0.2s;
  color: #fff;
}

.atem-card__play-btn svg {
  width: 44px;
  height: 44px;
  filter: var(--atem-shadow-hover);
  transition: transform 0.18s;
}

.atem-card--expandable:hover .atem-card__play-btn {
  background: rgba(0, 0, 0, 0.42);
}

.atem-card--expandable:hover .atem-card__play-btn svg {
  transform: scale(1.12);
}

/* YouTube iframe inside lightbox */
.atem-lightbox[data-type="video"] .atem-lightbox__wrap {
  /* Wide enough so the 16:9 iframe is 50 vh tall; clamp to 92 vw on small screens */
  width: min(calc(50vh * 16 / 9), 92vw);
}

.atem-lightbox__video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.atem-lightbox__video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.atem-card__body {
  padding: 16px;
}

.atem-card__title {
  color: #333;
  margin: 0 0 10px;
  line-height: 1.3;
}

.atem-card__excerpt {
  color: #888;
  margin: 0 0 4px;
  line-height: 1.5;
}

.atem-card__byline {
  color: #999;
}

.atem-card__quote {
  margin: 0;
  padding: 24px 20px;
  border-left: none;
}

.atem-card__quote p {
  font-style: italic;
  color: #555;
  line-height: 1.6;
  margin: 0 0 8px;
}

.atem-card__quote cite {
  font-style: normal;
  color: #999;
}

/* ─── Load more ──────────────────────────────────────────────────── */
.atem-gallery__load-more {
  text-align: center;
  margin-top: 24px;
}

.atem-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--atem-btn-h-md);
  padding: 0 var(--atem-btn-px-md);
  border-radius: var(--atem-radius-md);
  border: 1.5px solid var(--atem-violet);
  background: transparent;
  color: var(--atem-violet);
  font-family: var(--atem-font-primary);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.atem-load-more-btn:hover {
  background-color: var(--atem-violet);
  border-color: var(--atem-violet);
  color: #fff;
}

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

.atem-gallery__empty {
  text-align: center;
  color: var(--atem-gray);
  padding: 40px 0;
  grid-column: 1 / -1;
}

/* ─── Submission form ─────────────────────────────────────────────── */
.atem-submission-form-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.atem-form-heading {
  font-size: var(--wp--preset--font-size--xx-large);
  text-align: center;
  margin-bottom: 0.25rem;
}

.atem-form-subheading {
  text-align: center;
  color: var(--atem-gray);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.atem-form-divider {
  border: none;
  border-top: 1px solid #d0d0d0;
  margin-bottom: 1.5rem;
}

.atem-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.atem-optional {
  font-weight: 400;
  color: var(--atem-gray);
  font-size: 0.8125rem;
  margin-left: 4px;
}

.atem-select-wrap {
  position: relative;
}

.atem-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--atem-gray);
  font-size: 0.75rem;
}

/* ─── Upload zone ────────────────────────────────────────────────── */
.atem-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
  border: 1.5px dashed #d0d0d0;
  border-radius: var(--atem-radius-lg);
  background: #ffffff;
  cursor: pointer;
  padding: 20px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  position: relative;
}

.atem-upload-zone:hover {
  border-color: var(--atem-teal);
  background-color: var(--atem-teal-pastel);
}

/* File queued — solid teal border + green-tinted background */
.atem-upload-zone.has-file {
  border-style: solid;
  border-color: var(--atem-teal);
  background-color: var(--atem-teal-pastel);
}

/* Invalid file type — solid red border + red-tinted background */
.atem-upload-zone.has-error {
  border-style: solid;
  border-color: #d32f2f;
  background-color: #fdf3f3;
}

.atem-upload-icon {
  font-size: 1.5rem;
  color: #bbb;
  transition: color 0.15s ease;
  line-height: 1;
}

.atem-upload-zone.has-file .atem-upload-icon {
  color: var(--atem-teal);
}

.atem-upload-zone.has-error .atem-upload-icon {
  color: #d32f2f;
}

.atem-upload-text {
  font-size: 0.8125rem;
  color: var(--atem-gray);
  word-break: break-all;
  text-align: center;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.atem-upload-zone.has-file .atem-upload-text {
  color: var(--atem-teal);
  font-weight: 600;
}

.atem-upload-zone.has-error .atem-upload-text {
  color: #d32f2f;
  font-weight: 600;
}

.atem-upload-hint {
  font-size: 0.6875rem;
  color: #bbb;
}

/* "Tap to change" hint shown only when a file is queued */
.atem-upload-change-hint {
  display: none;
  font-size: 0.6875rem;
  color: var(--atem-gray);
}

.atem-upload-zone.has-file .atem-upload-change-hint {
  display: block;
}

.atem-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ─── Turnstile widget ───────────────────────────────────────────── */
.atem-field-group--captcha {
  margin-bottom: 0;
}

.cf-turnstile {
  display: flex;
  justify-content: center;
}

/* ─── Submit button ──────────────────────────────────────────────── */
.atem-form-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.atem-submit-btn {
  width: 240px;
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--atem-radius-lg);
}

/* ── AJAX success panel ──────────────────────────────────────── */
.atem-form-success__actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.atem-share-another-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--atem-btn-h-md);
  padding: 0 var(--atem-btn-px-md);
  border-radius: var(--atem-radius-md);
  border: 1.5px solid var(--atem-teal);
  background: transparent;
  color: var(--atem-teal);
  font-family: var(--atem-font-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.atem-share-another-btn:hover {
  background-color: var(--atem-teal);
  color: #fff;
}

.atem-form-disclaimer {
  font-size: 0.6875rem;
  color: #bbb;
  text-align: center;
  margin: 0;
}

/* ─── Notices ────────────────────────────────────────────────────── */
.atem-notice {
  padding: 14px 18px;
  border-radius: var(--atem-radius-md);
  margin-bottom: 24px;
  font-size: 0.875rem;
}

.atem-notice ul {
  margin: 6px 0 0 1.25rem;
  padding: 0;
}

.atem-notice--success {
  background-color: var(--atem-teal-pastel);
  border-left: 4px solid var(--atem-teal);
  color: #005c56;
}

.atem-notice--error {
  background-color: var(--atem-valencia-pastel);
  border-left: 4px solid var(--atem-valencia);
  color: #7a2800;
}

/* ─── Lightbox ───────────────────────────────────────────────────── */

/* Prevent body scroll when open */
body.atem-lightbox-open {
  overflow: hidden;
}

.atem-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: atem-lb-fade-in 0.18s ease;
}

.atem-lightbox[hidden] {
  display: none;
}

@keyframes atem-lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.atem-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

/* Wrap — sits above the overlay */
.atem-lightbox__wrap {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: atem-lb-pop-in 0.2s cubic-bezier(0.34, 1.26, 0.64, 1);
}

@keyframes atem-lb-pop-in {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Close button — top-right corner of the wrap */
.atem-lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow:var(--atem-shadow-sm);
  color: #333;
  z-index: 2;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.atem-lightbox__close:hover {
  background: var(--atem-teal);
  color: #fff;
  transform: scale(1.1);
}

/* ── Image lightbox — card style ── */
.atem-lightbox[data-type="image"] .atem-lightbox__wrap {
  width: min(560px, 90vw);
}

.atem-lightbox__card {
  background: #fff;
  border-radius: var(--atem-radius-lg);
  overflow: hidden;
  box-shadow: var(--atem-shadow-sm);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.atem-lightbox__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: contain;
  background: #f0f0f0;
}

.atem-lightbox__card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #ebebeb;
}

.atem-lightbox__byline {
  font-size: 0.6875rem;
  color: #999;
}

/* ── Text lightbox ── */
.atem-lightbox[data-type="text"] .atem-lightbox__wrap {
  width: min(800px, 90vw);
}

.atem-lightbox[data-type="text"] .atem-lightbox__content {
  background: #fff;
  border-radius: var(--atem-radius-lg);
  padding: 36px 32px;
  overflow-y: auto;
  max-height: 80vh;
  box-shadow: var(--atem-shadow-md);
}


.atem-lightbox__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin:0;
  line-height: 1.3;
}

.atem-lightbox__body {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  white-space: pre-wrap;
  padding:20px;
}

.atem-lightbox__author {
  font-size: 0.875rem;
  color: var(--atem-gray);
  font-style: italic;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.atem-lightbox__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.atem-lightbox__tag-pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--atem-teal-pastel);
  border: 1px solid var(--atem-teal-light);
  border-radius: var(--atem-radius-pill);
  font-size: 0.6875rem;
  color: #005c56;
  white-space: nowrap;
  line-height: 1.5;
}

/* ── Expandable card (whole-card click) ── */
.atem-card--expandable {
  cursor: pointer;
  position: relative; /* anchors the icon */
}

.atem-card--expandable:hover {
  border-color: var(--atem-teal);
  box-shadow: var(--atem-shadow-hover);

}

.atem-card--expandable:focus-visible {
  outline: var(--atem-focus-ring);
  outline-offset: var(--atem-focus-offset);
}

/* Image scale on card hover */
.atem-card--expandable .atem-card__img {
  transition: transform 0.25s ease;
  display: block;
  width: 100%;
}

.atem-card--expandable:hover .atem-card__img {
  transform: scale(1.04);
}

/* ── Expand / fullscreen corner icon ── */
.atem-card__expand-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.52);
  border-radius: 6px;
  color: #fff;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none; /* icon itself isn't the click target */
  z-index: 1;
}

.atem-card--expandable:hover .atem-card__expand-icon,
.atem-card--expandable:focus-visible .atem-card__expand-icon {
  opacity: 1;
  transform: scale(1);
}

/* ─── Tag input ──────────────────────────────────────────────────── */
.atem-field-hint {
  font-size: 0.6875rem;
  color: var(--atem-gray);
  margin: 2px 0 0;
}

.atem-field-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.625rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f5f5f5;
  line-height: 1.6;
}

.atem-tag-input {
  display: flex;
  width:100%;
  flex-direction: column;
  gap:10px;
  flex-wrap: wrap;
  align-items: center;
  min-height: 42px;
  cursor: text;
  position: relative;
}

.atem-tag-pills {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  min-height:30px;
}

.atem-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 10px;
  background: var(--atem-teal-pastel);
  border: 1px solid var(--atem-teal-light);
  border-radius: var(--atem-radius-pill);
  font-size: 0.8125rem;
  color: #005c56;
  white-space: nowrap;
}

.atem-tag-pill__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0.6;
  transition: opacity 0.1s ease, background 0.1s ease;
}

.atem-tag-pill__remove:hover {
  opacity: 1;
  background: rgba(0,166,155,0.15);
}

.atem-tag-search-wrapper {
  width: 100%;
  min-width: 120px;
}

.atem-tag-search {
  min-width: 80px;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--atem-font-primary);
  font-size: 0.875rem;
  color: var(--atem-black);
  padding: 0;
  box-shadow: none;
}

.atem-tag-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--atem-teal);
  border-radius: var(--atem-radius-md);
  box-shadow: var(--atem-shadow-sm);
  list-style: none;
  margin: 0;
  padding: 0;
  padding-right:24px;
  width:100%;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

.atem-tag-option {
  padding: 8px 14px;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--atem-black);
  transition: background 0.1s ease;
}

.atem-tag-option:hover,
.atem-tag-option.is-active {
  background: var(--atem-teal-pastel);
  color: #005c56;
}

/* ─── Filter visibility fix ──────────────────────────────────── */
/* .atem-card sets display:inline-block which beats [hidden]'s
   display:none in the UA stylesheet — this restores expected hiding. */
.atem-card[hidden] {
  display: none !important;
}

/* ─── Card tag pills ──────────────────────────────────────────── */
.atem-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.atem-card__tag-pill {
  display: inline-block;
  padding: 2px 8px;
  background: var(--atem-teal-pastel);
  border: 1px solid var(--atem-teal-light);
  border-radius: var(--atem-radius-pill);
  font-size: 0.6875rem;
  color: #005c56;
  white-space: nowrap;
  line-height: 1.5;
}

/* ─── Tag filter bar ──────────────────────────────────────────── */
.atem-filter-bar {
  margin-bottom: 24px;
  max-width: var(--wp--style--global--content-size);
  margin-inline:auto;
}

.atem-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: var(--atem-radius-md);
  font-family: var(--atem-font-primary);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--atem-black);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.atem-filter-toggle:hover {
  border-color: var(--atem-teal);
  box-shadow: var(--atem-shadow-sm);
}

.atem-filter-toggle[aria-expanded="true"] {
  border-color: var(--atem-teal);
  background: var(--atem-teal-pastel);
  color: #005c56;
}

/* Visual indicator when a filter is actively narrowing results */
.atem-filter-toggle.is-filtered {
  background: #fff8ec;
  border-color: var(--atem-tangerine);
  color: #7a4f00;
}

.atem-filter-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.atem-filter-toggle[aria-expanded="true"] .atem-filter-chevron {
  transform: rotate(180deg);
}

.atem-filter-panel {
  margin-top: 10px;
  padding: 16px;
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: var(--atem-radius-md);
  box-shadow: var(--atem-shadow-sm);
}

.atem-filter-section {
  margin-bottom: 16px;
}

.atem-filter-section:last-child {
  margin-bottom: 0;
}

.atem-filter-section__label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--atem-gray);
  margin-bottom: 8px;
}

/* Icon + label gap inside type pills */
.atem-filter-type-pill {
  gap: 5px;
}

.atem-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

/* Active state: coloured */
.atem-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: var(--atem-teal);
  border: 1.5px solid var(--atem-teal);
  border-radius: var(--atem-radius-pill);
  font-family: var(--atem-font-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  color:#fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.atem-filter-pill:hover {
  background: var(--atem-teal-light);
  color: #005c56;
}

/* Inactive state: grey */
.atem-filter-pill:not(.is-active) {
  background: #f2f2f2;
  border-color: #ccc;
  color: #aaa;
}

.atem-filter-pill:not(.is-active):hover {
  background: #e8e8e8;
  border-color: #bbb;
  color: #888;
}

.atem-filter-actions {
  display: inline-block;
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--atem-font-primary);
  font-size: 0.8125rem;
  color: var(--atem-teal);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.atem-filter-actions:hover {
  color: var(--atem-teal-hover);
}
