/* =============================================================
   FILENAME    = /assets/css/quote_cards.css
   VERSION     = 2.1.0
   UPDATED     = 2026-05-23
   PURPOSE     = Quote card styles. Each card uses CSS custom
                 properties (--qc-*) for colours and font so
                 admin can fully customise per quote.
                 Style templates define layout/decoration only.
   ============================================================= */

/* ── CSS CUSTOM PROPERTY DEFAULTS ───────────────────────────── */
:root {
  --qc-bg1:    #f97316;
  --qc-bg2:    #f43f5e;
  --qc-dir:    135deg;
  --qc-color:  #ffffff;
  --qc-font:   inherit;
  --qc-opacity: 1;
}

/* ── BASE CARD ───────────────────────────────────────────────── */
.quote-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 16px;
  text-align: center;
  transition: box-shadow 0.3s ease;
  font-family: var(--qc-font);
}

/* Aspect ratios */
.quote-card[data-ratio="1:1"] { aspect-ratio: 1 / 1; }
.quote-card[data-ratio="4:3"] { aspect-ratio: 4 / 3; }
.quote-card[data-ratio="3:4"] { aspect-ratio: 3 / 4; }

/* Quote text */
.quote-card .qc-text {
  font-size: clamp(1em, 3.5vw, 1.6em);
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
  color: var(--qc-color);
  opacity: var(--qc-opacity);
  font-family: var(--qc-font);
}

/* Author */
.quote-card .qc-author {
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  color: var(--qc-color);
  opacity: calc(var(--qc-opacity) * 0.75);
}
.quote-card .qc-author::before { content: '— '; }

/* Watermark */
.quote-card .qc-watermark {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 0.65em;
  opacity: 0.4;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 2;
  color: var(--qc-color);
}

/* Opening quote mark */
.quote-card .qc-mark {
  font-size: 5em;
  line-height: 0.6;
  opacity: 0.15;
  font-family: Georgia, serif;
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1;
  color: var(--qc-color);
}

/* ══════════════════════════════════════════════
   STYLE 1 — MINIMAL
   Clean white card — custom colours applied as
   accent border + text. BG stays white/light.
   ══════════════════════════════════════════════ */
.quote-card[data-style="minimal"] {
  background: #ffffff;
  border: 2px solid var(--qc-bg1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.quote-card[data-style="minimal"] .qc-text    { color: #1c1917; font-family: var(--qc-font, 'Playfair Display', Georgia, serif); }
.quote-card[data-style="minimal"] .qc-author  { color: #78716c; opacity: 1; }
.quote-card[data-style="minimal"] .qc-mark    { color: var(--qc-bg1); }
.quote-card[data-style="minimal"] .qc-watermark { color: #78716c; }

/* ══════════════════════════════════════════════
   STYLE 2 — GRADIENT
   Full custom gradient background
   ══════════════════════════════════════════════ */
.quote-card[data-style="gradient-warm"],
.quote-card[data-style="gradient-cool"],
.quote-card[data-style="gradient-gold"] {
  background: linear-gradient(var(--qc-dir), var(--qc-bg1) 0%, var(--qc-bg2) 100%);
}

/* ══════════════════════════════════════════════
   STYLE 3 — DARK
   Dark bg with custom accent colour for author
   ══════════════════════════════════════════════ */
.quote-card[data-style="dark"] {
  background: #1c1917;
  border: 1px solid #292524;
}
.quote-card[data-style="dark"] .qc-text    { color: #fafaf9; font-family: var(--qc-font, 'Nunito', sans-serif); }
.quote-card[data-style="dark"] .qc-author  { color: var(--qc-bg1); opacity: 1; }
.quote-card[data-style="dark"] .qc-mark    { color: var(--qc-bg1); }
.quote-card[data-style="dark"] .qc-watermark { color: #57534e; }

/* ══════════════════════════════════════════════
   STYLE 4 — ELEGANT
   Cream bg, decorative top border in accent colour
   ══════════════════════════════════════════════ */
.quote-card[data-style="elegant"] {
  background: #faf7f2;
  border: 1px solid #e7d9c8;
  border-top: 4px solid var(--qc-bg1);
}
.quote-card[data-style="elegant"] .qc-text {
  color: #2d1b00;
  font-family: var(--qc-font, 'Cormorant Garamond', 'Playfair Display', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  opacity: 1;
}
.quote-card[data-style="elegant"] .qc-author  { color: var(--qc-bg1); font-style: normal; letter-spacing: 1px; opacity: 1; }
.quote-card[data-style="elegant"] .qc-mark    { color: var(--qc-bg1); font-size: 6em; }
.quote-card[data-style="elegant"] .qc-watermark { color: #b5a090; }
.quote-card[data-style="elegant"]::after {
  content: '✦';
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--qc-bg1);
  font-size: 1em;
  opacity: 0.6;
}

/* ══════════════════════════════════════════════
   STYLE 5 — BOLD
   Solid custom bg colour, large uppercase text
   ══════════════════════════════════════════════ */
.quote-card[data-style="bold"] {
  background: var(--qc-bg1);
}
.quote-card[data-style="bold"] .qc-text {
  color: var(--qc-color);
  font-family: var(--qc-font, 'Montserrat', sans-serif);
  font-weight: 900;
  font-size: clamp(1.1em, 4vw, 2em);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  opacity: 1;
}
.quote-card[data-style="bold"] .qc-author  { color: var(--qc-color); opacity: 0.75; font-family: var(--qc-font, 'Montserrat', sans-serif); }
.quote-card[data-style="bold"] .qc-mark    { color: var(--qc-color); font-size: 8em; opacity: 0.2; }
.quote-card[data-style="bold"] .qc-watermark { color: var(--qc-color); opacity: 0.5; }

/* ══════════════════════════════════════════════
   STYLE 6 — GLASSMORPHISM
   Frosted glass over custom gradient bg
   ══════════════════════════════════════════════ */
.quote-card[data-style="glassmorphism"] {
  background: linear-gradient(var(--qc-dir), var(--qc-bg1) 0%, var(--qc-bg2) 100%);
  padding: 0;
}
.quote-card[data-style="glassmorphism"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 16px;
  z-index: 1;
}
.quote-card[data-style="glassmorphism"] .qc-text    { color: var(--qc-color); font-family: var(--qc-font, 'Raleway', sans-serif); font-weight: 600; padding: 40px 36px 0; opacity: 1; }
.quote-card[data-style="glassmorphism"] .qc-author  { color: var(--qc-color); padding-bottom: 40px; opacity: 0.8; }
.quote-card[data-style="glassmorphism"] .qc-mark    { color: var(--qc-color); opacity: 0.4; }
.quote-card[data-style="glassmorphism"] .qc-watermark { color: var(--qc-color); opacity: 0.4; }

/* ══════════════════════════════════════════════
   STYLE 7 — VINTAGE
   Aged paper, ruled lines, accent border colour
   ══════════════════════════════════════════════ */
.quote-card[data-style="vintage"] {
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(139,90,43,0.06) 28px,
      rgba(139,90,43,0.06) 29px
    ),
    linear-gradient(160deg, #f5e6c8 0%, #ede0c4 50%, #e8d5aa 100%);
  border: 2px solid var(--qc-bg1);
  box-shadow: inset 0 0 60px rgba(139,90,43,0.08), 0 4px 16px rgba(0,0,0,0.12);
}
.quote-card[data-style="vintage"] .qc-text {
  color: #3d2b1f;
  font-family: var(--qc-font, 'EB Garamond', Georgia, serif);
  font-style: italic;
  opacity: 1;
}
.quote-card[data-style="vintage"] .qc-author  { color: var(--qc-bg1); opacity: 1; font-family: var(--qc-font, 'EB Garamond', serif); }
.quote-card[data-style="vintage"] .qc-mark    { color: var(--qc-bg1); font-size: 6em; }
.quote-card[data-style="vintage"] .qc-watermark { color: #a08060; }

/* ══════════════════════════════════════════════
   STYLE 8 — NEON
   Dark bg, glowing custom colour borders/text
   ══════════════════════════════════════════════ */
.quote-card[data-style="neon"] {
  background: #0a0a0f;
  border: 2px solid var(--qc-bg1);
  box-shadow: 0 0 20px color-mix(in srgb, var(--qc-bg1) 40%, transparent),
              inset 0 0 40px color-mix(in srgb, var(--qc-bg1) 8%, transparent);
}
.quote-card[data-style="neon"] .qc-text {
  color: #ffffff;
  font-family: var(--qc-font, 'Josefin Sans', sans-serif);
  font-weight: 700;
  text-shadow: 0 0 10px color-mix(in srgb, var(--qc-bg1) 70%, transparent);
  opacity: 1;
}
.quote-card[data-style="neon"] .qc-author  { color: var(--qc-bg1); text-shadow: 0 0 8px var(--qc-bg1); letter-spacing: 2px; opacity: 1; }
.quote-card[data-style="neon"] .qc-mark    { color: var(--qc-bg1); opacity: 0.2; }
.quote-card[data-style="neon"] .qc-watermark { color: var(--qc-bg1); opacity: 0.3; }
.quote-card[data-style="neon"]::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px;
  width: 20px; height: 20px;
  border-top: 2px solid var(--qc-bg1);
  border-left: 2px solid var(--qc-bg1);
}
.quote-card[data-style="neon"]::after {
  content: '';
  position: absolute;
  bottom: 8px; right: 8px;
  width: 20px; height: 20px;
  border-bottom: 2px solid var(--qc-bg1);
  border-right: 2px solid var(--qc-bg1);
}

/* ══════════════════════════════════════════════
   STYLE 9 — NATURE
   Soft gradient bg using custom colours
   ══════════════════════════════════════════════ */
.quote-card[data-style="nature"] {
  background: linear-gradient(160deg, var(--qc-bg1) 0%, var(--qc-bg2) 100%);
  border: 1px solid var(--qc-bg2);
}
.quote-card[data-style="nature"] .qc-text    { color: var(--qc-color); font-family: var(--qc-font, 'Lora', Georgia, serif); font-style: italic; opacity: 1; }
.quote-card[data-style="nature"] .qc-author  { color: var(--qc-color); opacity: 0.85; }
.quote-card[data-style="nature"] .qc-mark    { color: var(--qc-color); }
.quote-card[data-style="nature"] .qc-watermark { color: var(--qc-color); opacity: 0.5; }
.quote-card[data-style="nature"]::after {
  content: '🌿';
  position: absolute;
  top: 14px; right: 16px;
  font-size: 1.2em;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════
   STYLE 10 — SPLIT
   Left colour band, right white — modern layout
   ══════════════════════════════════════════════ */
.quote-card[data-style="split"] {
  background: #ffffff;
  border: none;
  box-shadow: 0 6px 32px rgba(0,0,0,0.1);
  padding-left: 52px;
}
.quote-card[data-style="split"]::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 12px;
  background: linear-gradient(180deg, var(--qc-bg1), var(--qc-bg2));
  border-radius: 16px 0 0 16px;
}
.quote-card[data-style="split"] .qc-text    { color: #1c1917; font-family: var(--qc-font, 'Poppins', sans-serif); opacity: 1; }
.quote-card[data-style="split"] .qc-author  { color: var(--qc-bg1); opacity: 1; }
.quote-card[data-style="split"] .qc-mark    { color: var(--qc-bg1); left: 52px; }
.quote-card[data-style="split"] .qc-watermark { color: #78716c; }

/* ══════════════════════════════════════════════
   STYLE 11 — OUTLINE
   White bg, large coloured outline border, minimal
   ══════════════════════════════════════════════ */
.quote-card[data-style="outline"] {
  background: #ffffff;
  border: 4px solid var(--qc-bg1);
  box-shadow: 8px 8px 0 var(--qc-bg2);
}
.quote-card[data-style="outline"] .qc-text    { color: #1c1917; font-family: var(--qc-font, 'Nunito', sans-serif); font-weight: 800; opacity: 1; }
.quote-card[data-style="outline"] .qc-author  { color: var(--qc-bg1); opacity: 1; }
.quote-card[data-style="outline"] .qc-mark    { color: var(--qc-bg1); }
.quote-card[data-style="outline"] .qc-watermark { color: #78716c; }

/* ══════════════════════════════════════════════
   STYLE 12 — IMAGE OVERLAY
   Quote over background image
   ══════════════════════════════════════════════ */
.quote-card[data-style="image-overlay"] {
  background: #1c1917;
  overflow: hidden;
}
.quote-card[data-style="image-overlay"] .qc-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.45;
}
.quote-card[data-style="image-overlay"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--qc-bg1) 20%, rgba(0,0,0,0.2)) 0%,
    rgba(0,0,0,0.6) 100%
  );
  z-index: 1;
}
.quote-card[data-style="image-overlay"] .qc-text    { color: #ffffff; font-family: var(--qc-font, 'Dancing Script', cursive); font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,0.5); opacity: 1; }
.quote-card[data-style="image-overlay"] .qc-author  { color: rgba(255,255,255,0.85); text-shadow: 0 1px 4px rgba(0,0,0,0.5); opacity: 1; }
.quote-card[data-style="image-overlay"] .qc-mark    { color: rgba(255,255,255,0.3); }
.quote-card[data-style="image-overlay"] .qc-watermark { color: rgba(255,255,255,0.5); }

/* ══════════════════════════════════════════════
   STYLE SWITCHER BUTTONS
   ══════════════════════════════════════════════ */
.quote-style-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}
.qss-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border-mid, #e2d5c8);
  background: var(--surface, #fff);
  color: var(--text-muted, #78716c);
  font-size: 0.78em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.qss-btn:hover  { border-color: var(--orange, #f97316); color: var(--orange, #f97316); }
.qss-btn.active { background: var(--orange, #f97316); border-color: var(--orange, #f97316); color: #fff; }

/* ══════════════════════════════════════════════
   ADMIN STYLE PICKER
   ══════════════════════════════════════════════ */
.style-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.style-picker-item {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}
.style-picker-item:hover  { transform: translateY(-2px); }
.style-picker-item.selected { border-color: var(--accent, #5B86E5); }
.style-picker-item input[type="checkbox"] {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 10;
  width: 16px; height: 16px;
  accent-color: var(--accent, #5B86E5);
}
.style-picker-item .style-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.7em;
  font-weight: 700;
  text-align: center;
  padding: 4px 6px;
  text-transform: capitalize;
}
.style-mini-card {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 0.6em;
  text-align: center;
  line-height: 1.4;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════
   MASONRY LAYOUT (quotes.php listing)
   ══════════════════════════════════════════════ */
.quotes-masonry {
  columns: 2;
  column-gap: 12px;
  padding: 0 0 24px;
}
.quotes-masonry .quote-masonry-item {
  break-inside: avoid;
  margin-bottom: 12px;
  display: block;
  text-decoration: none;
}
.quotes-masonry .quote-card {
  border-radius: 12px;
  width: 100%;
  aspect-ratio: unset;
  min-height: 140px;
}
@media (min-width: 640px) {
  .quotes-masonry { columns: 3; column-gap: 14px; }
  .quotes-masonry .quote-card { min-height: 160px; }
}
@media (min-width: 1024px) {
  .quotes-masonry { columns: 4; column-gap: 16px; }
}

/* Style count badge on masonry cards */
.quote-masonry-item .qc-style-count {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.68em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  z-index: 3;
}