/* =========================================================
   GGS Player — CSS (complete build)
   File: ggs-player-pro/assets/css/ggs.css
   ========================================================= */

/* Canvas / reset for this template */
html, body { 
  margin: 0; 
  padding: 0; 
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body.ggsplayer-blank {
  background: #000;            /* Jet black canvas */
  color: #eaeaea;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Kill any theme wrappers that might inject spacing or backgrounds */
body.ggsplayer-blank .site,
body.ggsplayer-blank #page,
body.ggsplayer-blank #content,
body.ggsplayer-blank .entry-content {
  background: none !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* LAYOUT FIX 2: More aggressive removal of theme's top margin/padding */
/* Target common theme wrappers if the direct ID doesn't work */
body.ggsplayer-blank #page #content #ggs-player,
body.ggsplayer-blank .entry-content #ggs-player,
#ggs-player {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Main container around the shortcode output */
#ggs-player, .ggs-container, #speaker-root {
  width: min(1100px, 95%);
  margin-left: auto;  /* Use auto margins for centering */
  margin-right: auto;
  padding: clamp(16px, 2.5vw, 32px);
  box-sizing: border-box;
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.6;
}

/* Mobile: Full width on small screens */
@media (max-width: 768px) {
  body.ggsplayer-blank .site,
  body.ggsplayer-blank #page,
  body.ggsplayer-blank #content,
  body.ggsplayer-blank .entry-content,
  #ggs-player, .ggs-container, #speaker-root {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  
  /* Ensure all child elements respect mobile width */
  #ggs-player > *,
  .ggs-container > *,
  #speaker-root > * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Re-apply padding for the container *inside* the fixed player, ensure margin is reset */
#ggs-player .ggs-container {
    padding-top: clamp(16px, 2.5vw, 32px);
    margin-top: 0; /* Explicitly reset top margin */
}


/* ---------------------------------------------
   Host card (persistent)
   --------------------------------------------- */
#ggs-host { margin-bottom: clamp(12px, 2vw, 24px); }

.ggs-host {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  position: relative;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* LAYOUT FIX 2: More specific selector for host photo size */
body.ggsplayer-blank #ggs-host .ggs-host-photo,
.ggs-host .ggs-host-photo {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important; /* Prevent stretching */
  min-height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}

.ggs-host-text { font-size: 15px; line-height: 1.5; color: #eaeaea; flex: 1; min-width: 200px; }
.ggs-host-text strong { color: #f5e6b3; font-weight: 700; }
.ggs-host-text a { color: #ffd166; text-decoration: none; }
.ggs-host-text a:hover { text-decoration: underline; }

.ggs-score-pill {
    font-size: 14px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: #444;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

/* Score actions container (pill + leaderboard button) */
.ggs-score-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto; /* Push to the right */
}

.ggs-leaderboard-btn {
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 999px;
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
    border: 2px solid #1557b0;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(26, 115, 232, 0.4);
}

.ggs-leaderboard-btn:hover {
    background: #1557b0;
    border-color: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.6);
    color: #fff;
}

@media (max-width: 600px) {
  .ggs-host { flex-direction: column; text-align: center; }
  /* Apply fixes to mobile view too */
  body.ggsplayer-blank #ggs-host .ggs-host-photo,
  .ggs-host .ggs-host-photo {
       width: 64px !important;
       height: 64px !important;
       min-width: 64px !important;
       min-height: 64px !important;
       max-width: 64px !important;
       max-height: 64px !important;
   }
  .ggs-score-actions { 
      margin-left: 0;
      margin-top: 10px; 
      flex-direction: row;
      gap: 8px;
      justify-content: center;
      width: 100%;
  }
  .ggs-leaderboard-btn {
      font-size: 12px;
      padding: 6px 14px;
  }
}

/* ---------------------------------------------
   HERO: headshot (left) + meta (right)
   --------------------------------------------- */
.ggs-hero { margin: clamp(8px, 1.5vw, 16px) 0 0; }
.ggs-hero-inner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}

@media (max-width: 820px) {
  .ggs-hero-inner { grid-template-columns: 1fr; align-items: start; }
  .ggs-headshot { margin: 0 auto; }
}

.ggs-headshot {
  width: 240px; height: 240px;
  max-width: 100%;
  border-radius: 50%;
  object-fit: cover; object-position: center;
  display: block;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
}

.ggs-name {
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.12;
  color: #f5e6b3;
  margin: 0 0 .15em 0;
}
.ggs-title {
  font-size: clamp(16px, 2.2vw, 20px);
  color: #d9caa0;
  margin: 0 0 .5em 0;
}
.ggs-talkdesc {
  margin: 0; color: #eae7db; opacity: .95;
}

/* ---------------------------------------------
   AUDIO section
   --------------------------------------------- */
.ggs-main { margin-top: clamp(10px, 2vw, 16px); }
.ggs-audio-card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: clamp(10px, 1.8vw, 14px);
  margin: 0 0 clamp(16px, 2.2vw, 22px) 0;
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.ggs-audio-card audio { width: 100%; display: block; }

/* ---------------------------------------------
   ABOUT block
   --------------------------------------------- */
.ggs-block {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: clamp(16px, 2.2vw, 22px);
  margin: 0 0 clamp(16px, 2.2vw, 22px) 0;
}
.ggs-block h2 {
  font-size: clamp(22px, 3vw, 30px);
  color: #f0e6c1;
  margin: 0 0 .5em 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding-bottom: .35em;
}

/* ---------------------------------------------
   GIFTS grid
   --------------------------------------------- */
.ggs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2.5vw, 24px); }
@media (max-width: 860px){ .ggs-grid { grid-template-columns: 1fr; } }

.ggs-card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: clamp(16px, 2.2vw, 22px);
  box-shadow: 0 10px 26px rgba(0,0,0,.38);
}

.ggs-card h3 { color: #f5e6b3; margin: 0 0 .5em 0; font-size: clamp(19px, 2.4vw, 24px); }
.ggs-card.ggs-vip {
  background: radial-gradient(1200px 400px at 10% -20%, rgba(255,209,102,.22), rgba(255,209,102,0) 60%),
              linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-color: rgba(255,209,102,.35);
}

.ggs-value {
  display: inline-block; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 6px 12px; margin: .25em 0 .7em;
}

.ggs-btn {
  display: inline-block; font-weight: 800; text-decoration: none; color: #000;
  background: #ffd166; border-radius: 999px; padding: 10px 18px;
  transition: filter .2s ease, transform .06s ease;
}
.ggs-btn:hover { filter: brightness(1.05); }
.ggs-btn:active { transform: translateY(1px); }
.ggs-btn.ggs-upsell { background: #6a4cff; color: #fff; box-shadow: 0 10px 24px rgba(106,76,255,.35); }

.ggs-card:not(.ggs-vip) .ggs-btn { background: #333; color: #ffd166; border: 1px solid #ffd166; }
.ggs-card:not(.ggs-vip) .ggs-btn:hover { background: #444; color: #fff; }

/* High-contrast VIP gift button */
.ggs-card.ggs-vip .ggs-btn:not(.ggs-upsell) {
  background: linear-gradient(180deg, #ffd166, #f5b942);
  color: #000 !important;
  border: 2px solid rgba(0,0,0,0.5);
  box-shadow: 0 6px 18px rgba(255,209,102,.35);
}
.ggs-card.ggs-vip .ggs-btn:not(.ggs-upsell):hover {
  background: linear-gradient(180deg, #ffcc5c, #f0ae2f);
  color: #000 !important;
}

/* ---------------------------------------------
   Speaker Grid + Pill State Colors
   --------------------------------------------- */
.ggs-speaker-grid { margin-top: 32px; }
.ggs-grid-title { margin: 0 0 12px 0; font-size: 22px; color: #fff; }
.ggs-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 16px;
  padding-top: 10px;
}
.ggs-full-list .ggs-grid-wrap {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}


.ggs-grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 12px;
  text-decoration: none; color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Ensure child elements don't block clicks/taps on mobile */
.ggs-grid-card > * {
  pointer-events: none;
}

/* State Colors (Reverted to working v1.7.2 colors) */
.ggs-grid-card.state-none {
  background: rgba(120,120,120,0.25) !important;
  border: 1px solid rgba(160,160,160,0.5) !important;
}
.ggs-grid-card.state-visited {
  background: rgba(255,209,102,0.25) !important; /* Muted Gold */
  border: 1px solid #ffd166 !important; /* Gold border */
}
.ggs-grid-card.state-listened {
  background: rgba(82,214,107,0.25) !important;
  border: 1px solid #52d66b !important;
}

.ggs-grid-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }

.ggs-grid-img {
  width: 100px; height: 100px;
  border-radius: 999px; overflow: hidden; margin-bottom: 8px;
  flex-shrink: 0;
}
.ggs-grid-img img { width: 100%; height: 100%; object-fit: cover; }

.ggs-grid-name { font-weight: 700; margin-bottom: 4px; }
.ggs-grid-title-small { font-size: 14px; margin-bottom: 4px; color: #bbb; opacity: 0.8;}
.ggs-grid-badges { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }

.ggs-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); opacity: .45;
  background: #222; color: #bbb; font-weight: 900; font-size: 13px;
}
.ggs-badge.visit.on {
  background: #665c2a;
  color: #ffd166;
  opacity: 1;
}
.ggs-badge.listen.on { background: #1f5f2c; color: #52d66b; opacity: 1; }

/* === GGS: Enhancer and Rating Styles === */
/* NOTE: The inline CSS in the JS file defines the core enhancers/legends */
.ggs-rating-pill {
    background: rgba(255,209,102,.25);
    border: 1px solid #ffd166;
    color: #ffd166;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

/* Rating Card: present rating UI as a pill with prominent stars */
.ggs-rating-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,209,102,0.06);
  border: 1px solid rgba(255,209,102,0.16);
  color: #ffd166;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  max-width: 100%;
}

.ggs-rating-card h3 { margin: 0; font-size: 16px; color: #f5e6b3; }

.ggs-stars { display: inline-flex; gap: 6px; align-items: center; }

/* Stars: hollow/yellow outline when unselected, filled when selected. Larger for touch. */
.ggs-star {
  display: inline-block;
  font-size: 28px; /* Larger star size */
  line-height: 1;
  cursor: pointer;
  transition: color .12s ease, transform .08s ease, -webkit-text-stroke .08s ease;
  /* Hollow look: transparent fill with yellow stroke (WebKit browsers) */
  color: transparent;
  -webkit-text-stroke: 1.6px #ffd166;
  text-shadow: 0 0 0 rgba(0,0,0,0); /* baseline for non-WebKit fallback */
  user-select: none;
}

/* Hover/keyboard preview fills the star */
.ggs-star.hover,
.ggs-star:hover { color: #ffd166; -webkit-text-stroke: 0; transform: translateY(-2px); }

/* Selected state: filled yellow star */
.ggs-star.on {
  color: #ffd166;
  -webkit-text-stroke: 0;
  transform: translateY(-2px);
}

/* Saving indicator (subtle) */
.ggs-stars.saving { opacity: 0.6; pointer-events: none; }

/* Accessibility: focus ring for keyboard users */
.ggs-star:focus { outline: 3px solid rgba(255,209,102,0.18); outline-offset: 4px; }

@media (max-width: 600px) {
  .ggs-star { font-size: 34px; }
  .ggs-rating-card { padding: 10px 12px; gap: 10px; }
}

/* Base styles imported from JS Enhancer section */
.ggs-welcome{margin:10px auto 14px;max-width:1100px;width:95%;box-sizing:border-box}
.ggs-welcome-inner{background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.04));border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:10px 14px;box-shadow:0 6px 18px rgba(0,0,0,.35);color:#f5f5f5}
.ggs-welcome a{color:#ffd166;text-decoration:none}
.ggs-welcome a:hover{text-decoration:underline}
.ggs-legend{margin:4px 0 12px;color:#ddd;font-size:14px}
.ggs-legend .legend-visited{background:rgba(255,209,102,0.18); border:1px solid rgba(255,209,102,.4); color:#ffd166; padding:2px 8px; border-radius:999px; display:inline-block;}
.ggs-legend .legend-green{display:inline-block;padding:2px 8px;border-radius:999px;background:rgba(82,214,107,.25);border:1px solid #52d66b;color:#eaffea}

/* VIP Exclusive Events Pill */
.ggs-vip-events {
  margin: 20px auto 30px;
  max-width: 1100px;
  width: 95%;
}

.ggs-vip-events-link {
  display: block;
  background: linear-gradient(135deg, rgba(138,43,226,.15), rgba(75,0,130,.15));
  border: 2px solid rgba(138,43,226,.5);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 8px 24px rgba(138,43,226,.3);
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.ggs-vip-events-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,215,0,.05), rgba(138,43,226,.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ggs-vip-events-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(138,43,226,.4);
  border-color: rgba(255,215,0,.6);
}

.ggs-vip-events-link:hover::before {
  opacity: 1;
}

.ggs-vip-events-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255,215,0,.4);
}

.ggs-vip-events-title {
  color: #FFD700;
  font-size: 22px;
  font-weight: bold;
  margin: 16px 0 10px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,.3);
}

.ggs-vip-events-title:first-of-type {
  margin-top: 0;
}

.ggs-vip-events-dates {
  color: #f5f5f5;
  font-size: 16px;
  line-height: 1.6;
  margin: 8px 0;
  font-weight: 500;
}

.ggs-vip-events-note {
  color: #ddd;
  font-size: 14px;
  font-style: italic;
  margin: 6px 0 20px 0;
}

.ggs-vip-events-topics {
  color: #f5f5f5;
  font-size: 15px;
  line-height: 1.7;
  margin: 8px 0 0 0;
}

.ggs-vip-events-topics strong {
  color: #FFD700;
}

@media (max-width: 700px) {
  .ggs-vip-events-link {
    padding: 20px 18px;
  }
  
  .ggs-vip-events-title {
    font-size: 19px;
  }
  
  .ggs-vip-events-dates {
    font-size: 15px;
  }
}

/* Skool Community Promotions */
.ggs-skool-promos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px auto 30px;
  max-width: 1100px;
  width: 95%;
}

.ggs-skool-card {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: all 0.3s ease;
}

.ggs-skool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  border-color: rgba(255,209,102,.4);
}

.ggs-skool-text {
  color: #f5f5f5;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
  text-align: center;
}

.ggs-skool-link {
  display: block;
  text-decoration: none;
}

.ggs-skool-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

.ggs-skool-link:hover .ggs-skool-image {
  opacity: 0.9;
}

/* Summit Story Pill */
.ggs-story-pill {
  margin: 18px auto 18px;
  max-width: 1100px;
  width: 95%;
}
.ggs-story-pill-link {
  display: block;
  background: linear-gradient(135deg, #ffd166 0%, #ffb347 100%);
  border: 2px solid #ffd166;
  border-radius: 16px;
  padding: 18px 24px;
  box-shadow: 0 4px 16px rgba(255,209,102,.18);
  text-decoration: none;
  color: #222;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.ggs-story-pill-link:hover {
  box-shadow: 0 8px 32px rgba(255,209,102,.28);
  border-color: #ffb347;
}
.ggs-story-pill-inner {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  color: #222;
}
