/* ==========================================================================
   The Dozens - Mobile-First Stylesheet
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #770071;
  --color-secondary: #bd00b4;
  --color-accent: #beda00;
  --color-white: #ffffff;
  --color-background: #d7df0d;
  --color-text: #333333;

  /* Z-Index Scale */
  --z-preloader: 9999;
  --z-modal: 1000;
  --z-nav: 1030;
  --z-speech-bubble: 1000;

  /* Transitions */
  --transition-standard: 300ms ease;
  --transition-fast: 150ms ease;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Typography Scale */
  --font-size-xs: clamp(0.75rem, 2vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 2vw, 1rem);
  --font-size-base: clamp(1rem, 2.5vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 2.5vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 3vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 3.5vw, 2rem);
  --font-size-3xl: clamp(1.75rem, 4vw, 2.5rem);
}

/* ==========================================================================
   2. Font Faces
   ========================================================================== */
@font-face {
  font-family: 'YoMamaHeader';
  src: url('https://cdn.jsdelivr.net/gh/Terry-BrooksJr/the-dozens-django@c39984f366fe21d0e62d3c38bac514535e5b89a7/static/fonts/caloriesuit.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'YoMamaBody';
  src: url('https://cdn.jsdelivr.net/gh/Terry-BrooksJr/the-dozens-django@cfed15844ea94edfc7e4f61a1fb60f92570aeb68/static/fonts/JuliusSansOne-Regular.woff2') format('woff2');
  font-display: swap;
}

/* ==========================================================================
   3. CSS Reset & Base Styles (Mobile-First)
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  /* Mobile-first: gradient background */
  background: linear-gradient(169deg, rgba(215, 223, 13, 1) 0%, rgba(190, 218, 0, 1) 50%, rgba(119, 0, 113, 1) 100%);
  background-color: var(--color-background);
  font-family: 'YoMamaBody', Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Desktop: fixed background image */
@media (min-width: 769px) {
  body {
    background-image: url("https://cdn.jsdelivr.net/gh/Terry-BrooksJr/the-dozens-django@cfed15844ea94edfc7e4f61a1fb60f92570aeb68/static/assets/background.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
  }
}

/* ==========================================================================
   4. Typography (Mobile-First)
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6,
.header-font {
  font-family: 'YoMamaHeader', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   5. Preloader Styles
   ========================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: var(--z-preloader);
  opacity: 1;
  transition: opacity var(--transition-standard);
}

.loading-container {
  text-align: center;
  color: var(--color-white);
  padding: var(--spacing-md);
}

#loading-message {
  font-family: 'YoMamaHeader', Arial, sans-serif;
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-xl);
}

#phrases {
  max-width: min(600px, 90vw);
  margin: 0 auto;
}

.phrase-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--color-white);
  opacity: 0.7;
  transition: all var(--transition-standard);
  font-size: var(--font-size-sm);
}

.phrase-item.completed {
  opacity: 1;
}

.checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  opacity: 0;
  transition: opacity var(--transition-standard);
}

.phrase-item.completed .checkmark {
  opacity: 1;
}

.fade-out {
  opacity: 0 !important;
}

@media (min-width: 576px) {
  .phrase-item {
    padding: var(--spacing-md);
    font-size: var(--font-size-base);
  }

  .checkmark {
    width: 24px;
    height: 24px;
  }
}

/* ==========================================================================
   6. Layout & Content Wrapper
   ========================================================================== */
.content-wrapper {
  position: relative;
  opacity: 0;
  transition: opacity var(--transition-standard);
  min-height: 100vh;
}

.content-wrapper.show {
  opacity: 1;
}

.main-content {
  padding: var(--spacing-md);
  width: 100%;
}

@media (min-width: 768px) {
  .main-content {
    padding: var(--spacing-xl);
  }
}

/* ==========================================================================
   7. Navigation Styles (Mobile-First)
   ========================================================================== */
.yo-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--color-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Desktop: add backdrop filter */
@media (min-width: 768px) {
  .yo-nav {
    backdrop-filter: saturate(140%) blur(8px);
    background: color-mix(in srgb, var(--color-primary) 88%, transparent);
  }
}

.yo-nav .brand-text {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.yo-nav .nav-link {
  padding: var(--spacing-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-white);
  opacity: 0.95;
  font-size: var(--font-size-sm);
  text-align: center;
  transition: all var(--transition-fast);
}

@media (min-width: 768px) {
  .yo-nav .nav-link {
    padding: 0.75rem var(--spacing-md);
    font-size: var(--font-size-base);
  }
}

.yo-nav .nav-link:hover,
.yo-nav .nav-link:focus {
  opacity: 1;
}

.nav-link:active,
.nav-link.active {
  color: var(--color-white);
  opacity: 1;
  font-weight: 800;
  background: color-mix(in srgb, var(--color-primary) 88%, transparent);
  border-bottom: 2px solid var(--color-accent);
}

/* Navigation Underline Animation */
.nav-underline {
  position: relative;
}

.nav-underline::after {
  content: "";
  position: absolute;
  left: var(--spacing-md);
  right: var(--spacing-md);
  bottom: 0.35rem;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--color-accent);
  transition: transform 200ms var(--transition-standard);
}

.nav-underline:hover::after,
.nav-underline:focus::after,
.nav-link[aria-current="page"].nav-underline::after,
.nav-link.active.nav-underline::after {
  transform: scaleX(1);
}

/* Mobile nav adjustments */
@media (max-width: 767px) {
  .navbar-nav {
    text-align: center;
  }

  .navbar-nav .nav-item {
    margin: var(--spacing-xs) 0;
  }
}

/* Navbar Toggler */
.navbar-toggler {
  border: 0;
  box-shadow: none !important;
  padding: var(--spacing-sm);
}

.navbar-toggler:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ==========================================================================
   8. Buttons (Mobile-First)
   ========================================================================== */
.btn-accent {
  background: var(--color-accent);
  border: none;
  color: var(--color-text);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: var(--font-size-sm);
  transition: filter var(--transition-fast);
  cursor: pointer;
  min-height: 44px; /* Touch target size */
}

.btn-accent:hover,
.btn-accent:focus {
  filter: brightness(1.05);
}

@media (min-width: 768px) {
  .btn-accent {
    padding: 0.6rem var(--spacing-md);
    font-size: var(--font-size-base);
  }
}

/* ==========================================================================
   9. Dropdown Menus (Mobile-First)
   ========================================================================== */
.dropdown-menu {
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  min-width: 200px;
}

.dropdown-item {
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: background-color var(--transition-fast);
}

.dropdown-item:active {
  background: var(--color-accent);
  color: var(--color-text);
}

/* API Menu specific fixes */
#api-menu {
  /* Ensure proper Bootstrap dropdown behavior */
  display: none;
}

#api-menu.show {
  display: flex;
}

/* Horizontal dropdown for API menu - mobile stacks vertically */
.dropdown-menu-horizontal {
  display: none; /* Hidden by default, shown by Bootstrap */
  flex-direction: column;
  gap: 0;
  min-width: 200px;
}

.dropdown-menu-horizontal.show {
  display: flex;
  flex-direction: unset;
}

.dropdown-menu-horizontal > li {
  width: 100%;
}

.dropdown-menu-horizontal .dropdown-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: var(--spacing-sm);
  padding: 0.75rem;
  line-height: 1.2;
  white-space: normal;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
}

.dropdown-menu-horizontal .dropdown-item:last-child {
  border-bottom: none;
}

/* Desktop: horizontal layout — anchor right edge to prevent viewport overflow */
@media (min-width: 577px) {
  .dropdown-menu-horizontal.show {
    flex-direction: row;
    min-width: 280px;
    right: 0;
    left: auto;
  }

  .dropdown-menu-horizontal > li {
    flex: 1 1 auto;
    min-width: 80px;
  }

  .dropdown-menu-horizontal .dropdown-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    padding: var(--spacing-sm) var(--spacing-xs);
    font-size: 0.75rem;
  }

  .dropdown-menu-horizontal .dropdown-item:last-child {
    border-right: none;
  }
}

.api-nav-img {
  height: 24px;
  width: auto;
  display: block;
  margin-bottom: var(--spacing-xs);
}

/* ==========================================================================
   10. Cards & Content Sections (Mobile-First)
   ========================================================================== */
.features-section {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .features-section {
    padding: var(--spacing-xl);
  }
}

.card {
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-md);
}

.card-img-top {
  height: auto;
  max-height: 120px;
  width: auto;
  object-fit: contain;
  padding: var(--spacing-md);
}

.bg-silver {
  background: linear-gradient(to right, #ccc 0%, #eee 25%, #fff 50%, #eee 75%, #ccc 100%) !important;
}

/* Card Tabs */
.nav-tabs {
  flex-wrap: wrap;
  border-bottom: none;
}

.nav-tabs .nav-link {
  font-size: var(--font-size-xs);
  padding: var(--spacing-sm);
  white-space: nowrap;
  border: none;
}

@media (min-width: 577px) {
  .nav-tabs .nav-link {
    padding: var(--spacing-sm) 0.75rem;
    font-size: var(--font-size-sm);
  }
}

#built-with-list .nav-link.nav-underline {
  position: relative;
  font-family: "YoMamaHeader";
  text-decoration: none !important;
}

#built-with-list .nav-link.active {
  font-weight: bold;
}

/* ==========================================================================
   11. Images & Media (Mobile-First)
   ========================================================================== */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

#dozens-image {
  width: 100%;
  height: auto;
  max-width: 100%;
}

#jod-icon {
  height: auto;
  width: auto;
  max-height: 80px;
  max-width: 80px;
}

@media (min-width: 577px) {
  #jod-icon {
    max-height: 120px;
    max-width: 120px;
  }
}

#video {
  display: flex;
  align-items: center;
  justify-content: center;
}

#about-video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 768px) {
  #about-video {
    max-width: 75%;
  }
}

/* ==========================================================================
   12. Speech Bubble (Mobile-First)
   ========================================================================== */
.speech-bubble {
  position: fixed;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 16px;
  border-radius: var(--radius-xl);
  font-family: 'YoMamaBody', Arial, sans-serif;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  max-width: min(280px, 90vw);
  min-width: min(180px, 80vw);
  z-index: var(--z-speech-bubble);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-standard);
  pointer-events: none;
  border: 2px solid var(--color-accent);
}

.speech-bubble.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -10px;
  border: 10px solid transparent;
  border-top-color: var(--color-primary);
}

.speech-bubble.tail-left::after {
  left: 20px;
}

.speech-bubble.tail-right::after {
  left: auto;
  right: 20px;
}

.speech-bubble.loading {
  background: var(--color-secondary);
}

.speech-bubble.loading::before {
  content: '⟳ ';
  animation: spin 1s linear infinite;
  margin-right: 5px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   13. Interactive Elements (Mobile-First)
   ========================================================================== */

/* JOD attention pulse — runs until the user first clicks the icon */
@keyframes jod-attention-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px rgba(190, 218, 0, 0.45));
  }
  50% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 18px rgba(189, 0, 180, 0.95));
  }
}

.icon-joke-of-day {
  transition: all var(--transition-standard);
  cursor: pointer;
  height: auto;
  width: auto;
  max-height: 80px;
  animation: jod-attention-pulse 2.2s ease-in-out infinite;
}

/* Stop animation once the user has interacted */
.icon-joke-of-day.interacted {
  animation: none;
}

@media (min-width: 577px) {
  .icon-joke-of-day {
    max-height: 120px;
  }
}

/* Desktop: hover effects — also pause the pulse so hover wins */
@media (hover: hover) and (pointer: fine) {
  .icon-joke-of-day:hover {
    animation-play-state: paused;
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(189, 0, 180, 0.6));
  }
}

/* Mobile: touch effects */
@media (hover: none) and (pointer: coarse) {
  .icon-joke-of-day:active {
    transform: scale(0.95);
  }
}

/* Hint label below the icon */
.jod-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jod-hint {
  font-family: 'YoMamaBody', Arial, sans-serif;
  font-size: 0.58rem;
  color: var(--color-accent);
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
  margin-top: 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.jod-hint.hidden {
  opacity: 0;
}

/* ==========================================================================
   14. Accessibility & Focus States
   ========================================================================== */
.yo-nav :focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Touch targets - minimum 44x44px */
@media (max-width: 767px) {
  button,
  .btn,
  .nav-link,
  .dropdown-item,
  a[role="button"] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ==========================================================================
   15. Accordion (Mobile-First)
   ========================================================================== */

/* Undo global h1–h6 margin/font that breaks Bootstrap accordion layout.
   The .accordion-header <h2> must have margin:0 for the button to sit flush,
   and should use the body font so text doesn't overflow its container. */
.accordion-header {
  margin-bottom: 0;
  font-family: 'YoMamaBody', Arial, sans-serif;
}

.accordion-button {
  font-family: 'YoMamaBody', Arial, sans-serif;
  font-size: var(--font-size-sm);
  padding: var(--spacing-md);
}

.accordion-body {
  font-size: var(--font-size-sm);
  padding: var(--spacing-md);
}

@media (min-width: 768px) {
  .accordion-button {
    font-size: var(--font-size-base);
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .accordion-body {
    font-size: var(--font-size-base);
  }
}

/* ==========================================================================
   16. Utility Classes
   ========================================================================== */
.text-responsive {
  font-size: var(--font-size-base);
}

.d-none-mobile {
  display: none !important;
}

@media (min-width: 768px) {
  .d-none-mobile {
    display: block !important;
  }
}

.d-block-mobile {
  display: block !important;
}

@media (min-width: 768px) {
  .d-block-mobile {
    display: none !important;
  }
}

/* Spacing utilities */
.row {
  margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
  .row {
    margin-bottom: var(--spacing-xl);
  }
}

/* Copyright & Video Sub-copy */
.video-sub-copy,
.copyright-text {
  font-size: var(--font-size-xs);
  text-align: center;
  padding: var(--spacing-sm);
}

@media (min-width: 768px) {
  .video-sub-copy,
  .copyright-text {
    text-align: left;
    padding: 0;
  }
}

/* Mobile spacing adjustments */
@media (max-width: 767px) {
  .ms-md-5 {
    margin-left: 0 !important;
    margin-top: var(--spacing-md);
  }

  #about-video {
    margin-top: var(--spacing-md);
  }
}

/* ==========================================================================
   17. Heading Letter Bounce Animation
   ========================================================================== */
/* Letter bounce animation styles */
.letter {
  display: inline-block;
  transition: transform 0.1s ease;
}

.letter-space {
  display: inline-block;
}

/* ==========================================================================
   18. Additional Styles from index.html
   ========================================================================== */
/* Hover effects for headers and elements */
h1:hover,
h2:not(.accordion-header):hover,
h3:hover,
h4:hover,
h6:hover,
.uk-accordion-title:hover,
.phrase-item:hover,
.header-font:hover {
  font-family: 'YoMamaHeader', Arial, sans-serif;
  text-shadow:
    -1px -1px 0 var(--color-white),
    1px -1px 0 var(--color-white),
    -1px 1px 0 var(--color-white),
    1px 1px 0 var(--color-white);
  color: var(--color-primary);
}

/* Joke content styles */
.joke-of-day {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 25px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.joke-title {
  background-color: var(--color-accent);
  color: #333;
  border-radius: 15px;
  padding: 1rem;
  transition: background-color 0.3s ease;
}

.joke-title:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.scale-font {
  font-size: clamp(1rem, 2vw, 1.5rem);
}

/* Card specific overrides */
.card-title {
  color: unset;
  background-color: unset;
}

.card > h5,
.card-header > a {
  color: var(--color-primary);
}

/* Tab-specific styles */
#built-with-list > li {
  background-color: unset;
  color: unset;
}

#built-with-list > li > .nav-link.active {
  background-color: unset;
  color: unset;
  font-weight: bold;
}

/* Underline animations for built-with tabs */
#built-with-list .nav-link.nav-underline::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: .35rem;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--transition-standard);
}

#built-with-list .nav-link.nav-underline:hover::after,
#built-with-list .nav-link.nav-underline:focus::after,
#built-with-list .nav-link.nav-underline.active::after,
#built-with-list .nav-link.nav-underline[aria-selected="true"]::after {
  transform: scaleX(1);
}

/* Optional: avoid double underlines when active */
#built-with-list .nav-link.active {
  border-bottom: 0;
}

/* Navigation link spacing and focus states */
.nav-link:active,
.nav-link.active,
.card-header-tabs:active {
  color: var(--color-white);
  opacity: 1;
  font-weight: 800;
  background: color-mix(in srgb, var(--color-primary) 88%, transparent);
  border-bottom: 2px solid var(--color-accent);
}

/* Main content sections */
main {
  padding: 1rem 0;
}

#body-content {
  padding: 1rem;
}

@media (min-width: 768px) {
  #body-content {
    padding: 2rem;
  }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 767px) {
  .nav-link,
  .dropdown-item {
    padding: 0.75rem;
  }
}

/* ==========================================================================
   19. Print Styles
   ========================================================================== */
@media print {
  .yo-nav,
  .btn,
  .speech-bubble,
  #preloader {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}

#built-with-list .nav-link.active {
  font-weight: bold;
  color: var(--color-primary);
}

/* ==========================================================================
   20. Getting Started Modal
   ========================================================================== */
.gs-modal-header {
  background: var(--color-primary);
  color: var(--color-white);
  border-bottom: 3px solid var(--color-accent);
  padding: 1rem 1.25rem;
}

.gs-header-icon {
  font-size: 1.4rem;
  color: var(--color-accent);
}

.gs-step-nav {
  background: #f8f8f8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1.25rem 0;
  overflow-x: auto;
}

.gs-step-pills {
  flex-wrap: nowrap;
  gap: 0.25rem;
  min-width: max-content;
}

.gs-pill {
  font-family: 'YoMamaBody', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.5rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.gs-pill:hover {
  background: rgba(119, 0, 113, 0.08);
  color: var(--color-primary);
}

.gs-pill.active {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: rgba(0, 0, 0, 0.1);
  border-bottom-color: var(--color-white);
  box-shadow: 0 -2px 0 var(--color-accent) inset;
}

.gs-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

.gs-pill.active .gs-step-badge {
  background: var(--color-primary);
  color: var(--color-white);
}

.gs-modal-body {
  padding: 1.5rem;
  background: #fff;
}

/* Callout box */
.gs-callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: color-mix(in srgb, var(--color-accent) 15%, white);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.gs-callout-icon {
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* Section titles */
.gs-section-title {
  font-family: 'YoMamaHeader', Arial, sans-serif;
  color: var(--color-primary);
  font-size: 1rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.25rem;
  margin-bottom: 0.875rem;
}

/* Feature cards */
.gs-feature-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem;
  height: 100%;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.gs-feature-card:hover {
  box-shadow: 0 2px 8px rgba(119, 0, 113, 0.15);
  border-color: var(--color-accent);
}

.gs-feature-card h6 {
  font-family: 'YoMamaHeader', Arial, sans-serif;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.gs-feature-card p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: #555;
}

.gs-feature-icon {
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Endpoint row */
.gs-endpoint-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #1e1e2e;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
}

.gs-endpoint-code {
  font-size: 0.875rem;
  color: #cdd6f4;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

/* HTTP method badges */
.gs-method-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3rem;
  flex-shrink: 0;
  font-family: 'Courier New', monospace;
}

.gs-method-get  { background: #4ade80; color: #000; }
.gs-method-post { background: #60a5fa; color: #000; }

/* Code blocks */
.gs-block-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 0.4rem;
}

.gs-code-block {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  margin-bottom: 0;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gs-code-block code {
  color: inherit;
  font-family: 'Courier New', monospace;
  background: none;
  padding: 0;
}

/* Step header row */
.gs-step-header-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.gs-step-number-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: 'YoMamaHeader', Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(119, 0, 113, 0.35);
}

/* Tip box */
.gs-tip {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: color-mix(in srgb, var(--color-primary) 8%, white);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.gs-tip i {
  color: var(--color-accent);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* Parameter / reference table */
.gs-param-table {
  font-size: 0.85rem;
  border-color: rgba(0, 0, 0, 0.08);
}

.gs-param-table thead th {
  background: color-mix(in srgb, var(--color-primary) 10%, white);
  color: var(--color-primary);
  font-weight: 700;
  border-bottom: 2px solid var(--color-accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gs-param-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-accent) 6%, white);
}

/* Rate limit cards */
.gs-rate-card {
  background: color-mix(in srgb, var(--color-accent) 20%, white);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.gs-rate-card-auth {
  background: color-mix(in srgb, var(--color-primary) 12%, white);
  border-color: var(--color-primary);
}

.gs-rate-number {
  font-family: 'YoMamaHeader', Arial, sans-serif;
  font-size: 1.75rem;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.gs-rate-label {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.3;
}

/* Doc link cards */
.gs-doc-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.gs-doc-link:hover {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 8%, white);
  color: var(--color-primary);
}

.gs-doc-img {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.gs-badge-auth {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Footer */
.gs-modal-footer {
  background: #f8f8f8;
  border-top: 2px solid var(--color-accent);
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
}

@media (min-width: 576px) {
  .gs-modal-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.gs-footer-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gs-footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gs-link-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--color-white);
  color: var(--color-text);
  transition: background 0.15s, border-color 0.15s;
}

.gs-link-btn:hover {
  background: color-mix(in srgb, var(--color-accent) 15%, white);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.gs-link-btn-postman {
  border-color: #FF6C37;
}

.gs-link-btn-postman:hover {
  background: rgba(255, 108, 55, 0.1);
  border-color: #FF6C37;
}

.gs-link-icon {
  height: 18px;
  width: auto;
  object-fit: contain;
}

/* fs-sm utility */
.fs-sm { font-size: 0.875rem; }