/* ==========================================
   PBC THEME (extracted from old header include)
   Keeps existing look while fixing template structure.
   =========================================== */

/* Viewport safety (kept minimal; viewport-fix.css is primary) */
html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* DO NOT override Tailwind's .hidden class - it breaks responsive utilities like md:flex */

:root {
  --color-primary: #0066ff;
  --color-secondary: #e8de21;
  --color-cyan: #02a9ca;
  --color-bg-light: #ffffff;
  --color-bg-subtle: #f7f7f7;
  --color-card-light: #ffffff;
  --color-text-dark: #222222;
  --color-text-subtle: #6b7280;
  --color-white: #ffffff;
  /* Fixed header height for main padding (nav min-height + padding) */
  --header-height: 5.5rem;
  /* Consistent section spacing across all pages */
  --section-spacing-y: 2rem;
}
@media (min-width: 768px) {
  :root {
    --section-spacing-y: 3rem;
  }
}
@media (min-width: 1024px) {
  :root {
    --section-spacing-y: 4rem;
  }
}

.primary-text {
  color: var(--color-primary);
}
.secondary-text {
  color: var(--color-secondary);
}
.bg-primary {
  background-color: var(--color-primary);
}
.border-primary {
  border-color: var(--color-primary);
}

/* Utility classes for footer and other components */
.bg-bg-subtle {
  background-color: var(--color-bg-subtle);
}

.text-text-dark {
  color: var(--color-text-dark);
}

.text-text-subtle {
  color: var(--color-text-subtle);
}

.footer {
  background-color: var(--color-bg-subtle);
  border-top: 1px solid #e5e7eb;
}

/* Consistent section spacing (all pages) */
section {
  padding-top: var(--section-spacing-y) !important;
  padding-bottom: var(--section-spacing-y) !important;
}

/* Footer: same container as site, responsive on all devices */
.footer-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .footer-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
.footer-spacing {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .footer-spacing {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
}
@media (min-width: 1024px) {
  .footer-spacing {
    padding-top: 4rem;
    padding-bottom: 2.5rem;
  }
}
/* Footer mobile/tablet: readable text and touch targets */
@media (max-width: 1023px) {
  .footer-mobile .text-xl {
    font-size: 1.125rem;
  }
  .footer-mobile a[href] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .footer-mobile .space-y-6 > * + * {
    margin-top: 1.5rem;
  }
}
/* Footer: 2 columns at tablet (768px–1023px); Support + CTA below logo on left */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer-mobile-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto;
  }
  .footer-mobile-col-1,
  .footer-mobile-col-2,
  .footer-mobile-col-3 {
    min-width: 0;
  }
  .footer-mobile-col-1 {
    grid-column: 1;
    grid-row: 1;
  }
  .footer-mobile-col-2 {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
  }
  .footer-mobile-col-3 {
    grid-column: 1;
    grid-row: 2;
  }
  /* Force all footer text and content left-aligned (override inline center) */
  .footer-mobile,
  .footer-mobile p,
  .footer-mobile h4,
  .footer-mobile ul,
  .footer-mobile li {
    text-align: left !important;
  }
  .footer-mobile a[href]:not(.btn-hero),
  .footer-mobile .inline-flex,
  .footer-mobile .flex {
    justify-content: flex-start !important;
  }
  /* Logo block in left corner */
  .footer-mobile-col-1 {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
  }
  .footer-mobile-col-1 > a:first-of-type,
  .footer-mobile-col-1 > .flex {
    justify-content: flex-start !important;
    margin-right: auto;
  }
  .footer-mobile-col-1 > p {
    padding-left: 0 !important;
    padding-right: 1rem !important;
  }
  /* Button centered in column; text centered inside button */
  .footer-mobile a.btn-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .footer-copyright {
    text-align: center !important;
  }
}
/* Footer: 3 columns per row on tablet only (1024px–1279px); 5 columns on desktop (1280px+) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .footer-desktop {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: auto auto;
    gap: 1.5rem;
  }
  .footer-desktop-col-1 {
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    align-self: start;
  }
  .footer-desktop-col-2 {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  .footer-desktop-col-3 {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }
  .footer-desktop-col-4 {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }
  .footer-desktop-col-5 {
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: start;
  }
  .footer-desktop .text-lg {
    font-size: 1rem;
  }
  .footer-desktop .text-sm {
    font-size: 0.8125rem;
  }
}
@media (min-width: 1280px) {
  .footer-desktop {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto;
  }
  .footer-desktop-col-1,
  .footer-desktop-col-2,
  .footer-desktop-col-3,
  .footer-desktop-col-4,
  .footer-desktop-col-5 {
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: auto;
  }
}
/* Footer desktop: prevent cramping on medium screens */
@media (min-width: 1024px) and (max-width: 1200px) {
  .footer-desktop .text-lg {
    font-size: 1rem;
  }
  .footer-desktop .text-sm {
    font-size: 0.8125rem;
  }
}

body {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  font-family: "Poppins", sans-serif;
}

/* Header - Fixed on scroll (must override main.css .nav) */
.nav,
nav.nav {
  background-color: var(--color-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1024 !important;
  padding-top: 0.75rem;
  padding-bottom: 0;
  overflow: visible !important;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
/* Desktop: restore bottom padding when dropdown is hidden */
@media (min-width: 1024px) {
  .nav,
  nav.nav {
    padding-bottom: 0.75rem;
  }
}

/* Global header logo size */
.nav .site-logo {
  max-width: 96px !important;
  max-height: 96px !important;
  width: auto !important;
  height: auto !important;
}

/* Smaller logo at lg breakpoint to save space */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav .site-logo {
    max-width: 64px !important;
    max-height: 64px !important;
  }
}

/* Header uses same .container as site (aligns with main content) */
.nav .container {
  overflow: visible !important;
  flex-shrink: 0;
  max-width: 100% !important;
}
.nav > * {
  overflow: visible !important;
}


/* Main content: offset below fixed header */
main {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-height) + 0.5rem) !important;
}

.nav .nav-link,
.nav .text-text-dark,
.nav .text-text-subtle {
  color: var(--color-white);
}

/* Desktop nav links: comfortable spacing on tablet (lg) and desktop (xl) */
@media (min-width: 1025px) {
  .nav .nav-link {
    padding: 0.5rem 0.375rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .nav .btn-outline,
  .nav .btn-hero {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }
}
@media (min-width: 1280px) {
  .nav .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
  }

  .nav .btn-outline,
  .nav .btn-hero {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}

.nav .active {
  font-weight: 600;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 2px;
}

.footer a.active {
  font-weight: 600;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 2px;
}

/* Alpine.js - Hide elements before initialization */
[x-cloak] {
  display: none !important;
}

/* ==========================================
   DROPDOWN FINAL FIX - Aggressive Visibility
   =========================================== */

/* Force all parent containers to allow overflow */
.nav, .nav *, .container, .flex, #profile-dropdown-container, .profile-dropdown-wrapper, .language-dropdown-wrapper {
    overflow: visible !important;
}

/* Base Dropdown Menu styling */
.user-menu-dropdown, .language-menu-dropdown {
    display: none; /* Controlled by Alpine x-show */
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 10px !important;
    min-width: 220px !important;
    width: auto !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    z-index: 999999 !important;
    padding: 8px !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Header nav dropdowns only — do not use generic [x-show="open"] (schedule/calendar uses the same attr) */
/* :not([x-cloak]) prevents these from firing before Alpine.js initialises */
.user-menu-dropdown[x-show="open"]:not([x-cloak])[style*="display: block"],
.language-menu-dropdown[x-show="open"]:not([x-cloak])[style*="display: block"],
.user-menu-dropdown[x-show="open"]:not([x-cloak]):not([style*="display: none"]),
.language-menu-dropdown[x-show="open"]:not([x-cloak]):not([style*="display: none"]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure menu items are visible and clickable */
.dropdown-menu-item {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 15px !important;
    color: #333333 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-menu-item:hover {
    background-color: #f5f5f5 !important;
    color: #0066ff !important;
}

/* Profile dropdown wrapper */
.profile-dropdown-wrapper,
.language-dropdown-wrapper {
  position: relative !important;
  display: inline-block;
}

/* Profile dropdown button */
.profile-dropdown-button,
.language-dropdown-button {
  display: flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: white !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease !important;
  white-space: nowrap !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.profile-dropdown-button:hover,
.language-dropdown-button:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

.profile-dropdown-button:focus,
.language-dropdown-button:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

/* Dropdown arrow */
.dropdown-arrow {
  width: 1rem !important;
  height: 1rem !important;
  color: white !important;
  transition: transform 0.2s ease !important;
  flex-shrink: 0 !important;
  opacity: 0.8 !important;
}

.dropdown-arrow.rotate-180 {
  transform: rotate(180deg) !important;
}

/* User menu dropdown container - Aggressive Override */
.user-menu-dropdown,
.language-menu-dropdown {
  position: absolute !important;
  right: 0 !important;
  top: 100% !important;
  margin-top: 10px !important;
  min-width: 14rem !important;
  width: max-content !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  z-index: 10000 !important;
  padding: 8px !important;
  /* CRITICAL: No scrolling - show all items */
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  pointer-events: auto !important;
}

/* Ensure parents don't clip */
.profile-dropdown-wrapper,
.language-dropdown-wrapper {
  position: relative !important;
  overflow: visible !important;
}

/* Specific item styles to ensure visibility */
.dropdown-menu-item {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 44px !important;
}

.language-menu-dropdown {
  min-width: 10rem !important;
}

/* Dropdown menu items - Clean GitHub style */
.dropdown-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
  min-height: 2.25rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  color: #1f2937 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  text-decoration: none !important;
  text-align: left !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.dropdown-menu-item:hover {
  background-color: #f3f4f6 !important;
  color: #0066ff !important;
}

.dropdown-menu-item:active {
  background-color: #e5e7eb !important;
}

/* Dropdown icons */
.dropdown-icon {
  width: 1.125rem !important;
  height: 1.125rem !important;
  flex-shrink: 0 !important;
  stroke-width: 2 !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
}

.dropdown-menu-item:hover .dropdown-icon {
  opacity: 1 !important;
}

/* Dropdown divider - subtle like GitHub */
.dropdown-divider {
  height: 0 !important;
  margin: 0.5rem 0 !important;
  border: none !important;
  border-top: 1px solid #e5e7eb !important;
}

/* Danger item (Sign out) */
.dropdown-menu-item-danger {
  color: #dc2626 !important;
}

.dropdown-menu-item-danger:hover {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
}

.dropdown-menu-item-danger .dropdown-icon {
  color: #dc2626 !important;
}

/* Text content inside dropdown items */
.dropdown-menu-item span {
  pointer-events: none !important;
  flex: 1 !important;
}

/* Language dropdown form styling */
.language-menu-dropdown form {
  display: block !important;
  width: 100% !important;
}

.language-menu-dropdown button {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  text-align: left !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: #1f2937 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.language-menu-dropdown button:hover {
  background-color: #f3f4f6 !important;
  color: #0066ff !important;
}

/* All children inherit pointer cursor */
.user-menu-dropdown *,
.language-menu-dropdown * {
  cursor: pointer !important;
}

/* CRITICAL: Prevent Bootstrap carousel interference */
.profile-dropdown-wrapper,
.profile-dropdown-wrapper *,
.language-dropdown-wrapper,
.language-dropdown-wrapper *,
.user-menu-dropdown,
.user-menu-dropdown *,
.language-menu-dropdown,
.language-menu-dropdown *,
[x-data],
[x-data] * {
  --bs-carousel-controls-display: none !important;
}

/* Prevent any carousel controls */
.carousel-control-prev,
.carousel-control-next,
.carousel-indicators {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Cards & Testimonials */
.card,
.testimonial-card {
  background-color: var(--color-card-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
}

.card:hover,
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Buttons — brand pill style */
html .btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-secondary);
  color: #222;
  font-family: 'Proxima Nova Book', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0.8rem 2.25rem;
  border-radius: 100px !important; 
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-hero:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 222, 33, 0.4);
  opacity: 0.92;
}

.btn-hero:active {
  transform: translateY(0);
  box-shadow: none;
}

html.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  font-family: 'Proxima Nova Book', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0.8rem 2.25rem;
  border-radius: 100px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

/* Dashboard blue filled buttons on blue background */
.dashboard-welcome-card .btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color: var(--color-primary);
  border: 2px solid #fff;
  font-family: 'Proxima Nova Book', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0.8rem 2.25rem;
  border-radius: 100px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.dashboard-welcome-card .btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Small button variants for card actions */
html .btn-hero-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-secondary);
  color: #222;
  font-family: 'Proxima Nova Book', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.25rem;
  border-radius: 100px !important;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-hero-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(232, 222, 33, 0.35);
  opacity: 0.92;
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  font-family: 'Proxima Nova Book', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline-sm:hover {
  background-color: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 102, 255, 0.2);
}

html .btn-danger-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #dc2626;
  border: 2px solid #dc2626;
  font-family: 'Proxima Nova Book', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.25rem;
  border-radius: 100px !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-danger-sm:hover {
  background-color: #dc2626;
  color: #fff;
  transform: translateY(-1px);
}

/* ==========================================
   HEALTHY DIMENSIONS - Boxes/cards not full screen width
   Override viewport-fix * rule so content has a sensible max-width site-wide
   ========================================== */
.container,
main .container {
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

/* Desktop/tablet: cap content width so boxes aren't full viewport */
@media (min-width: 769px) {
  .container,
  main .container {
    max-width: 1280px !important;
  }
}

@media (min-width: 768px) {
  .container,
  main .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Nested containers (e.g. dashboard) fill parent but don't exceed it */
main .container .container {
  max-width: 100% !important;
}

/* ==========================================
   BOOKING MODAL - Brand colors, modern design, no broken text
   ========================================== */
dialog#enrollModal,
dialog#enrollModal:modal {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  position: fixed !important;
  inset: 0 !important;
  display: none;
  flex-direction: column;
  background: #fff;
}
dialog#enrollModal[open],
dialog#enrollModal[open]:modal {
  display: flex !important;
}
#enrollModal::backdrop {
  background: rgba(75, 85, 99, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#enrollModal #enrollForm,
#enrollModal #bookedClassDetails {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
@media (min-width: 640px) {
  dialog#enrollModal,
  dialog#enrollModal:modal {
    width: 95% !important;
    max-width: 1200px !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 4rem) !important;
    min-height: 0 !important;
    inset: 0 !important;
    margin: auto !important;
    border-radius: 1rem;
    border: 1px solid #f3f4f6 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
  }
}

/* ── PBC-53 PR C — request modal (mirrors enrollModal sizing, narrower) ─────── */
dialog#requestModal,
dialog#requestModal:modal {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  min-width: 100vw !important;
  min-height: 100dvh !important;
  position: fixed !important;
  inset: 0 !important;
  display: none;
  flex-direction: column;
  background: #fff;
}
dialog#requestModal[open],
dialog#requestModal[open]:modal { display: flex !important; }
#requestModal::backdrop {
  background: rgba(75, 85, 99, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#requestModal #requestForm {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
@media (min-width: 640px) {
  dialog#requestModal,
  dialog#requestModal:modal {
    width: 95% !important;
    max-width: 560px !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 4rem) !important;
    min-height: 0 !important;
    inset: 0 !important;
    margin: auto !important;
    border-radius: 1rem;
    border: 1px solid #f3f4f6 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
  }
}
.request-type-card.is-selected {
  border-color: #a23e8c;
  background-color: #fdf4fa;
}

/* Session type radio: show dot and ring when checked */
#enrollModal #groupSession:checked + label .session-type-ring,
#enrollModal #privateSession:checked + label .session-type-ring {
  border-color: var(--color-primary);
}
#enrollModal #groupSession:checked + label .session-type-dot,
#enrollModal #privateSession:checked + label .session-type-dot {
  display: block !important;
}
/* Modal content: prevent broken text on all devices */
#enrollModal .enroll-modal-dialog,
#enrollModal .enroll-modal-dialog * {
  word-break: normal;
  overflow-wrap: break-word;
}
/* 1rem padding on all boxes inside the booking popup */
#enrollModal .enroll-modal-box {
  padding: 1rem !important;
}
/* Align Class Title / Class Description value with labels (same left edge as TEACHER, LANGUAGE, etc.) */
#enrollModal .enroll-spec-value-below {
  margin-left: 1.75rem; /* icon width 1rem + gap 0.75rem */
}
#enrollModal .topic-type-btn {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
/* Desktop: keep topic type on one line when space allows */
@media (min-width: 1280px) {
  #enrollModal .topic-type-btn {
    white-space: nowrap !important;
  }
}
/* Tablet and mobile: allow topic type button text to wrap to prevent breaking/overlap */
@media (max-width: 1279px) {
  #enrollModal .topic-type-btn {
    white-space: normal !important;
    font-size: 0.875rem;
    line-height: 1.35;
    text-align: center;
    padding: 0.75rem 0.5rem;
  }
  #enrollModal .topic-type-grid {
    min-width: 0;
  }
}
/* Session type labels: subtext can wrap */
#enrollModal .session-type-label .text-xs {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
}
/* Desktop: keep session type title on one line when space allows */
@media (min-width: 1280px) {
  #enrollModal .session-type-label .font-medium {
    white-space: nowrap !important;
  }
}
/* Tablet: allow session type card text to wrap so it stays in the box */
@media (max-width: 1279px) {
  #enrollModal .session-type-grid {
    min-width: 0;
  }
  #enrollModal .session-type-label {
    min-width: 0 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }
  #enrollModal .session-type-label .font-medium {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.35;
  }
  #enrollModal .session-type-label .text-xs {
    overflow-wrap: break-word;
    word-break: normal;
  }
}
#enrollModal .step-tab {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
#enrollModal .step-tab > div {
  min-width: 0;
  overflow-wrap: break-word;
}
#enrollModal h3, #enrollModal h4, #enrollModal h5,
#enrollModal .font-semibold, #enrollModal .font-medium {
  word-break: normal;
  overflow-wrap: break-word;
}
#enrollModal #seatsLeft,
#enrollModal .text-yellow-700 {
  white-space: nowrap !important;
}
/* Desktop/tablet: keep tab labels on one line where space allows */
@media (min-width: 641px) {
  #enrollModal .step-tab {
    white-space: nowrap !important;
  }
}
/* Mobile: hide <br> so tabs stay one line on desktop */
#enrollModal .tab-br-mobile {
  display: none;
}
@media (max-width: 639px) {
  #enrollModal .topic-type-btn {
    white-space: normal !important;
    font-size: 0.8125rem;
    line-height: 1.3;
    padding: 0.625rem 0.375rem !important;
  }
  #enrollModal #seatsLeft,
  #enrollModal .text-yellow-700 {
    white-space: normal !important;
  }
  #enrollModal .enroll-modal-card {
    padding: 0.625rem !important;
  }
  #enrollModal .enroll-modal-section-title {
    font-size: 0.8125rem !important;
    margin-bottom: 0.375rem !important;
  }
  #enrollModal .session-type-grid {
    gap: 0.5rem !important;
  }
  #enrollModal .enroll-session-type-label {
    padding: 0.5rem !important;
  }
  #enrollModal select,
  #enrollModal textarea {
    padding: 0.5rem 0.75rem !important;
    font-size: 16px !important;
  }
  #enrollModal .step-content .pr-4 {
    padding-right: 0 !important;
  }
}

/* Booking footer on phones (step 2 shows Previous / Cancel / Confirm).
   The dialog is a full-screen modal (width:100vw) with overflow:hidden, and a
   global mobile rule stretches buttons toward full width. Inside the no-wrap
   footer that forced flexbox to shrink the buttons below their own text, so the
   label spilled past the screen edge and got clipped — worse on a real phone,
   whose default font (e.g. Roboto) is wider than the desktop test font.
   Fix: pin the footer buttons to their content width (no grow, no shrink) so
   they sit at natural size — three short buttons fit one row with room to
   spare — and let the row wrap as a safety net so nothing can ever be clipped,
   at any width or font. */
@media (max-width: 639px) {
  #enrollModal .enroll-modal-footer {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  #enrollModal .enroll-modal-footer-actions {
    gap: 0.5rem !important;
    min-width: 0;
  }
  #enrollModal #formActions button {
    width: auto !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
    font-size: 0.75rem !important;
  }
  /* Keep Previous on the left and Cancel/Confirm on the right. */
  #enrollModal #prevStep {
    margin-right: auto !important;
  }
}

/* ==========================================
   GOOGLE CALENDAR STYLE IMPROVEMENTS
   ========================================== */

/* Google Calendar inspired grid layout */
.schedule-calendar-grid-header {
  background: #f8f9fa;
  border-bottom: 2px solid #dadce0;
}

.schedule-calendar-grid-body {
  background: #ffffff;
}

/* Calendar container with fixed height and scroll */
.schedule-calendar-container {
  position: relative;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

/* Inner calendar wrapper — desktop caps height so the header stays visible
   while the time-grid scrolls inside. On tablet (iPad 768–1023px) we leave
   height uncapped and let the whole page scroll, because iOS Safari binds
   pan-y to any inner scroller and prevents the page from scrolling when the
   finger is inside the calendar. */
.schedule-calendar-inner {
  display: flex;
  flex-direction: column;
}

/* iPad/touch default: the inner box does not scroll in either axis, so the
   whole page scrolls as one unit.
   - BOTH axes must be `visible` explicitly — CSS spec silently promotes a
     `visible` axis to `auto` when the other axis is auto/scroll/hidden,
     which would re-create the pan-y touch trap on iOS Safari.
   - !important is required because viewport-fix.css (loaded earlier) sets
     `overflow-x: auto !important` on this same selector and would otherwise
     trigger the spec promotion. Our declaration wins by cascade order. */
#scheduleScrollContainer {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* Desktop only — gated on pointer:fine so iPad landscape (1024px wide) is
   still treated as touch and avoids the inner-scroll trap. */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .schedule-calendar-inner {
    max-height: calc(100vh - 250px);
  }
  #scheduleScrollContainer {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
}

/* Time column styling in header */
/* Accesibilidad mayores (auditoría 11/07): letra mayor (~14px) y texto oscuro
   (near-black) en lugar del gris flojo #5f6368, para que las horas se lean bien. */
.schedule-time-column {
  background: #f8f9fa;
  border-right: 1px solid #dadce0;
  font-size: 14px;
  font-weight: 600;
  color: #202124;
  padding: 12px 8px;
  text-align: right;
  min-width: 60px;
}

/* Time column styling in body - with sticky left */
.schedule-time-column-body {
  background: #f8f9fa;
  border-right: 1px solid #dadce0;
  font-size: 14px;
  font-weight: 600;
  color: #202124;
  padding: 12px 8px;
  text-align: right;
  min-width: 60px;
  position: sticky;
  left: 0;
  z-index: 20;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}
/* iPad: GPU acceleration for book slots (768px-1024px).
   Note: the previous overflow-x: auto !important on #scheduleScrollContainer
   was removed here because combined with the default overflow-y: visible it
   silently became overflow: auto (CSS spec), which re-created the touch
   trap. iPad no longer needs horizontal scroll at this breakpoint — the
   grid uses md:min-w-full so it fits the viewport. */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .book-slot {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* Day column headers */
.schedule-day-header {
  background: #f8f9fa;
  text-align: center;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 500;
  color: #202124;
  min-height: 85px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Calendar slots - Google Calendar style with dynamic height */
.schedule-slot {
  border-bottom: 1px solid #dadce0;
  border-right: 1px solid #dadce0;
  min-height: 60px;
  padding: 4px;
  background: #ffffff;
  transition: background-color 0.2s ease;
  /* Allow dynamic height based on content */
  height: auto;
  display: flex;
  flex-direction: column;
}

.schedule-slot:hover {
  background-color: #f8f9fa;
}

/* Dynamic height adjustment for slots with multiple teachers */
.schedule-slot .space-y-1\.5 {
  gap: 3px;
}

/* Desktop calendar grid slots only (scoped to .schedule-calendar-container) */
/* Accesibilidad mayores (auditoría 11/07): letra de ~12px -> 14px para que el
   nombre del profe se lea sin esfuerzo. Los colores de texto se oscurecen abajo. */
.schedule-calendar-container .book-slot {
  border-radius: 4px !important;
  font-size: 14px !important;
  padding: 6px 8px !important;
  margin: 1px 0;
  border: none !important;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  min-height: auto;
  height: auto;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-calendar-container .book-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Desktop calendar color palette */
.schedule-calendar-container .book-slot:not(.bg-blue-100):not(.bg-yellow-50):not(.bg-green-50):not(.bg-purple-50):not(.bg-gray-100) {
  background-color: #e6f4ea !important;
  color: #0b5f2a !important;
  border-left: 4px solid #34a853 !important;
}
.schedule-calendar-container .book-slot.bg-blue-100 {
  background-color: #e8f0fe !important;
  color: #0052cc !important;              /* azul de marca (home #0066ff) un poco más oscuro: legible (contraste 5.9) */
  border-left: 4px solid #4285f4 !important;
}
.schedule-calendar-container .book-slot.bg-yellow-50 {
  background-color: #fef7e0 !important;
  color: #8a4b00 !important;
  border-left: 4px solid #fbbc04 !important;
}
.schedule-calendar-container .book-slot.bg-green-50 {
  background-color: #e6f4ea !important;
  color: #0b5f2a !important;
  border-left: 4px solid #34a853 !important;
}
.schedule-calendar-container .book-slot.bg-purple-50 {
  background-color: #f3e8fd !important;
  color: #7e22ce !important;
  border-left: 4px solid #a855f7 !important;
}

/* ── PBC-53 PR C — class-request marks (magenta) & empty-gap affordance ──────
   Deliberately separate classes from .book-slot so the existing slot click
   handler and the desktop `border:none`/`border-left` overrides never capture
   them. Colours are CLOSED in PBC-53 ("Colores del calendario"). Booking slots
   have no dark-mode rules today, so requests match (no dark variant). */
/* Unified with the booking cells: fill + a left accent stroke + a SOLID border,
   just like .book-slot. The magenta colour + the "Request"/"Group X/4" label are
   what say "solicitud" — no dashed edge (the dashed stays only on the empty-gap
   placeholder .request-gap, which is a different thing). */
.request-slot {
  cursor: pointer;
  border: 1.5px solid #a23e8c;             /* sólido, como .book-slot (el magenta + la etiqueta ya dicen "solicitud") */
  border-left: 4px solid #a23e8c;          /* acento lateral, como las reservas */
  background-color: #fbf1f7;               /* relleno base (individual/grupal a medias) */
  color: #5e1a52;
  border-radius: 8px;
  font-weight: 500;                        /* iguala el grosor de .book-slot */
  -webkit-tap-highlight-color: rgba(162, 62, 140, 0.15);
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.request-slot:hover { background-color: #f7e6f1; }

/* Group request: FLAT fill — the X/4 counter conveys how full it is (no gradient).
   Full group: NO special border either — la plenitud la dicen el contador X/4 + la
   etiqueta "Full" + que desaparezca el "Join". La clase .is-full sigue para la
   etiqueta/JS, pero ya no cambia el borde (marcas sólidas como .book-slot). */

/* The viewer's own request → fuller fill so it stands out (like the blue booking);
   keeps the solid border + accent. */
.request-slot.is-mine {
  background-color: #f2d5e6;
}

/* Empty clickable gap: neutral dashed + ＋, no fixed colour (PBC-53 spec).
   Faintly visible so it's discoverable, full on cell hover. */
.request-gap {
  cursor: pointer;
  border: 1.5px dashed #cbd5e1;
  color: #94a3b8;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: rgba(2, 169, 202, 0.15);
  touch-action: manipulation;
}
.schedule-slot:hover .request-gap { opacity: 1; }
.request-gap:hover {
  border-color: #a23e8c;
  color: #a23e8c;
  background-color: rgba(247, 230, 241, 0.5);
}

/* Desktop grid: match book-slot sizing/box so marks align in the same stack. */
.schedule-calendar-container .request-slot,
.schedule-calendar-container .request-gap {
  font-size: 12px !important;
  padding: 6px 8px !important;
  margin: 1px 0;
  border-radius: 4px;
  min-height: auto;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-calendar-container .request-slot {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.schedule-calendar-container .request-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.schedule-calendar-container .request-gap { min-height: 26px; }

/* Month-view open-requests badge (same magenta family as .request-slot). */
.request-badge {
  background-color: #f7e6f1;
  color: #5e1a52;
  border: 1px dashed #a23e8c;
}

/* Mobile slot cards — keep template styling, ensure clickability */
.book-slot {
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(2, 169, 202, 0.15);
  touch-action: manipulation;
}

/* On mobile, prevent transition-all from interfering with touch/scale interactions */
@media (max-width: 767px) {
  .book-slot {
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  .book-slot > .absolute {
    pointer-events: none;
  }
}

/* Calendar container width - Google Calendar style */
.schedule-calendar-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

/* Responsive adjustments for mobile (desktop grid only) */
@media (max-width: 768px) {
  .schedule-slot {
    min-height: 80px;
    height: auto;
  }
  
  .schedule-calendar-container .book-slot {
    font-size: 13px !important;
    padding: 4px 6px !important;
    min-height: auto;
    height: auto;
  }

  .schedule-time-column {
    font-size: 12px;
    padding: 8px 4px;
    min-width: 40px;
  }
}

/* ==========================================
   SCHEDULE / BOOKING PAGE - Prevent broken text (Day/Week/Month, Language)
   ========================================== */
.schedule-filters-form {
  flex-wrap: wrap;
  min-width: 0;
}
.schedule-language-wrap {
  min-width: 8rem;
  flex-shrink: 0;
}
.schedule-language-select {
  min-width: 8rem !important;
  white-space: nowrap;
}
.schedule-view-switcher {
  display: inline-flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 5px;
  padding: 4px;
  flex-shrink: 0 !important;
  min-width: 0;
}
.schedule-view-btn {
  padding: 0.45rem 1.25rem;
  font-size: 14px;
  font-weight: 600;
  border-radius: 5px;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap !important;
  word-break: keep-all;
  overflow-wrap: normal;
}
.schedule-view-btn:hover {
  color: #111827;
  background: #e5e7eb;
}
.schedule-view-btn.active {
  background: #02A9CA;
  color: #fff;
  box-shadow: 0 1px 3px rgba(2, 169, 202, 0.3);
}
.schedule-view-btn.active:hover {
  background: #028da8;
  color: #fff;
  min-width: 4.5rem;
}
/* Schedule date nav: arrows in corners, text centered (mobile-friendly) */
.schedule-date-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}
.schedule-date-nav-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  color: #4b5563;
  cursor: pointer;
  transition: background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.schedule-date-nav-arrow:hover {
  background-color: #f3f4f6;
}
.schedule-date-nav-arrow-icon {
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}
@media (min-width: 640px) {
  .schedule-date-nav {
    gap: 0.75rem;
  }
  .schedule-date-nav-arrow {
    width: 2.5rem;
    height: 2.5rem;
  }
  .schedule-date-nav-arrow-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}
/* iOS/iPadOS Safari fix: keep the week/day arrows tappable.
   On touch devices a global rule (mobile-responsive.css) forces every <button>
   to `padding: 0.75rem 1.5rem` + `min-width/height: 48px`. Combined with the
   global `* { max-width: 100% !important }` and the small-screen
   `svg { width: auto; height: auto }` reset (viewport-fix.css), that squeezes
   the arrow's content box to ~0 and collapses the icon to a sliver. Chrome
   (Blink) still hit-tests the whole 48px box, so it works on Android; Safari
   (WebKit) registers taps on the painted content, and with the icon collapsed
   there is almost nothing to tap — the arrow looks fine but does nothing.
   Pin the arrows to a solid square target, zero the injected padding, and
   protect the icon size so WebKit always has real content to tap. */
.schedule-date-nav-arrow {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 !important;
  flex: none;
  touch-action: manipulation;
}
.schedule-date-nav-arrow-icon {
  width: 1.25rem !important;
  height: 1.25rem !important;
  max-width: none !important;
  flex: none;
  pointer-events: none;
}
.schedule-date-range {
  word-break: keep-all;
  overflow-wrap: normal;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  margin: 0;
  padding: 0 0.25rem;
  min-width: 0;
  overflow: visible;
}
@media (min-width: 640px) {
  .schedule-date-range {
    font-size: 1.25rem;
  }
}

/* Booking Details modal: explicit button widths */
.booking-details-modal-close-icon {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0.5rem;
}
.booking-details-modal-close-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.booking-details-modal-close-btn {
  min-width: 6rem;
  width: auto;
}

/* Teacher Availability: prevent broken text on tablet/mobile */
.availability-toolbar {
  word-break: keep-all;
}
.availability-date-display,
.availability-today-btn,
.availability-view-btn,
.availability-bulk-delete {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.availability-date-nav {
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .availability-date-nav {
    gap: 0;
  }
}

/* Mobile: date row = arrows at corners, text centered (one row) */
.availability-date-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}
.availability-date-row .availability-date-display {
  text-align: center;
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}
.availability-date-arrow {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .availability-date-row {
    display: flex;
  }
  .availability-date-row .availability-date-display {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .availability-date-arrow {
    width: auto;
    min-width: auto;
    height: auto;
  }
}
.availability-view-btn {
  min-width: 3.5rem;
}
.availability-actions {
  gap: 0.5rem;
}

/* Teacher Availability: smaller checkboxes on mobile (Select All + slot checkboxes) */
@media (max-width: 639px) {
  .availability-select-all-checkbox,
  .availability-checkbox {
    width: 0.875rem !important;
    height: 0.875rem !important;
    min-width: 0.875rem !important;
    min-height: 0.875rem !important;
  }
  .availability-select-all-label {
    font-size: 0.75rem;
    margin-left: 0.375rem;
  }
}

/* Teacher Availability: 3 per row on mobile (weekday headers + month grid) */
@media (max-width: 639px) {
  .availability-weekday-headers {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: auto;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    text-align: center;
    padding-left: 0;
  }
  .availability-weekday {
    padding: 0.25rem;
  }
  #monthGrid {
    grid-template-columns: 1fr !important;
  }
}

/* Availability page: form inputs full width and aligned on mobile */
@media (max-width: 639px) {
  .availability-details-grid,
  .availability-schedule-grid {
    width: 100%;
    min-width: 0;
  }
  .availability-details-grid > *,
  .availability-schedule-grid > *,
  .availability-form-field {
    min-width: 0;
    width: 100%;
  }
  /* Force single column so Description and Meeting Link match Class Title width */
  .availability-details-grid {
    grid-template-columns: 1fr !important;
  }
  .availability-details-grid > * {
    grid-column: 1 !important;
  }
  /* Remove extra horizontal padding from Description and Meeting Link so they align with Class Title */
  .availability-details-grid #classDescription,
  .availability-details-grid #meetingLink {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .availability-details-grid .availability-form-field:nth-child(2),
  .availability-details-grid .availability-form-field:nth-child(3) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .availability-details-grid input,
  .availability-details-grid textarea,
  .availability-details-grid select,
  .availability-schedule-grid input,
  .availability-schedule-grid textarea,
  .availability-schedule-grid select {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Dashboard: Mark Attendance / Attendance buttons – no text wrap on mobile */
@media (max-width: 639px) {
  .attendance-btn-pending,
  .attendance-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* Dashboard: Schedule Details modal close button – w-auto on mobile only */
@media (max-width: 639px) {
  #scheduleDetailsModal .schedule-details-modal-close {
    width: auto;
  }
}

/* Edit Availability modal: close button right, buttons in two rows on mobile */
@media (max-width: 639px) {
  #editAvailabilityModal .edit-availability-modal-content {
    position: relative;
    direction: ltr;
  }
  #editAvailabilityModal .edit-availability-modal-close {
    position: absolute !important;
    left: auto !important;
    right: 1rem !important;
    top: 1rem !important;
    margin-left: 0;
    width: auto;
  }
  #editAvailabilityModal .edit-availability-modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  #editAvailabilityModal .edit-availability-btn {
    width: 100%;
    white-space: nowrap;
    font-size: 0.875rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Dashboard: cards span full container width */
.dashboard-welcome-card {
  max-width: 100%;
  width: 100%;
}
.dashboard-stats-row {
  width: 100%;
  max-width: 100%;
}
.dashboard-credits-card {
  max-width: 100%;
  width: 100%;
}
.dashboard-upcoming-card {
  max-width: 100%;
  width: 100%;
}
.dashboard-class-card {
  max-width: 100%;
  width: 100%;
}
.dashboard-card-blank {
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  min-height: 10rem;
  box-shadow: none;
}
/* Upcoming Classes: 1 card per row below 1025px, 3 cards per row from 1025px */
.upcoming-classes-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 1025px) {
  .upcoming-classes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .upcoming-blank-visible {
    display: block;
  }
}
.dashboard-stat-card {
  width: 100%;
}
/* Dashboard responsive adjustments */

.hero-title {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
  }
}

.steps-title {
  color: var(--color-primary);
  font-size: 1.75rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .steps-title {
    font-size: 2.5rem;
  }
}

.stat-value {
  color: var(--color-secondary);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 3.5rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  opacity: 0;
  animation: scaleIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-enter {
  opacity: 0;
  animation: enter 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-blob {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(
    circle,
    rgba(2, 169, 202, 0.05) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  border-radius: 50%;
  animation: pulse 10s infinite alternate;
  z-index: 0;
  filter: blur(50px);
}

@keyframes pulse {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.1) translate(20px, 20px);
  }
}

/* Nav breakpoint: mobile/tablet below 1025px, desktop at 1025px+ */
.nav-mobile-only {
  display: flex;
}
.nav-desktop-only {
  display: none !important;
}
.nav-desktop-flex {
  display: none !important;
}
@media (min-width: 1025px) {
  .nav-mobile-only {
    display: none !important;
  }
  .nav-desktop-only {
    display: block !important;
  }
  .nav-desktop-flex {
    display: flex !important;
  }
}

/* Mobile & tablet header (hamburger layout: below 1025px) */
@media (max-width: 1024px) {
  .nav .container {
    margin: 0 auto !important;
    max-width: 100% !important;
  }

  .nav img.site-logo,
  .nav .site-logo {
    max-width: 56px !important;
    max-height: 56px !important;
    border: none !important;
  }

  .nav .flex {
    gap: 0 !important;
  }
}

/* Small mobile: slightly tighter header padding */
@media (max-width: 767px) {
  .nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

/* ==========================================
   FULL-SITE RESPONSIVE: TABLET & MOBILE
   Applied across all pages
   ========================================== */

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    max-width: 100%;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .steps-title {
    font-size: 2rem;
  }

  .card,
  .testimonial-card {
    padding: 1.25rem;
  }

  .hero-content {
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .steps-grid,
  .stats-grid {
    gap: 1.25rem;
  }

  .grid.grid-cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }

  main.min-h-screen {
    min-height: 100vh;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .steps-title {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .card,
  .testimonial-card {
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }

  .steps-grid,
  .stats-grid {
    gap: 1rem;
  }

  .grid.grid-cols-2,
  .grid.grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .btn-hero,
  .btn-outline,
  .btn-outline-white {
    padding: 0.7rem 1.5rem;
    font-size: 0.875rem;
  }
}

/* Slightly smaller header offset on small mobile (reduced nav padding) */
@media (max-width: 767px) {
  :root {
    --header-height: 5rem;
  }
}

/* ==========================================
   GLOBAL RESPONSIVE FIXES (all pages)
   Prevent overflow and improve layout on tablet/mobile
   ========================================== */

/* Allow flex/grid children to shrink (prevents horizontal scroll) */
@media (max-width: 1023px) {
  .flex,
  .grid,
  [class*="grid"],
  [class*="flex"] {
    min-width: 0;
  }
  .container .flex,
  .container .grid,
  main .container {
    min-width: 0;
  }
}

/* Ensure content doesn't overflow viewport on mobile */
@media (max-width: 767px) {
  .container,
  main .container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Flex/grid direct children can shrink */
  .container > .flex > *,
  .container > .grid > *,
  .container > [class*="grid"] > *,
  main .container > .flex > *,
  main .container > .grid > * {
    min-width: 0;
  }
}

/* ==========================================
   CIRCLE AVATARS (tablet & mobile only)
   Override responsive image rules so avatars stay round.
   ========================================== */
@media (max-width: 1023px) {
  /* Home: testimonial avatars */
  .testimonials-section .testimonial-header img.avatar,
  .testimonials-section .testimonial-card img.avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
  }

  /* About: team avatars (override mobile-responsive [class*="avatar"] ) */
  .team-avatar {
    width: 150px !important;
    height: 150px !important;
    min-width: 150px;
    min-height: 150px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }
  .team-avatar img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

@media (max-width: 480px) {
  .team-avatar {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px;
    min-height: 120px;
  }
}

