/*
 * support.css — Floating support button + quick-access drawer
 * Shared across all AquaPoloAI pages.
 * Relies on CSS custom properties defined per-page (:root tokens).
 */

/* ── Floating trigger button ── */
.support-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5625rem 1.125rem;
  background: rgba(6,12,20,0.92);
  color: rgba(237,232,223,0.58);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px;
  font-family: var(--font, -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: background 200ms, border-color 200ms, color 200ms;
}
.support-trigger:hover {
  background: rgba(6,12,20,0.98);
  border-color: rgba(255,255,255,0.16);
  color: rgba(237,232,223,0.9);
}
.support-trigger:focus-visible {
  outline: 2px solid rgba(201,168,76,0.8);
  outline-offset: 3px;
}
.support-trigger__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(62,198,212,0.65);
  flex-shrink: 0;
}

/* ── Panel ── */
.support-panel {
  position: fixed;
  bottom: 4.125rem;
  right: 1.5rem;
  z-index: 50;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(560px, calc(100vh - 6rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(9,15,26,0.97);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.65),
    0  0   0   0.5px rgba(255,255,255,0.03);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.25,0,0.1,1), transform 220ms cubic-bezier(0.25,0,0.1,1);
}
.support-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.support-panel::-webkit-scrollbar { width: 3px; }
.support-panel::-webkit-scrollbar-track { background: transparent; }
.support-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 2px; }

/* Panel header */
.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  background: rgba(9,15,26,0.97);
  z-index: 1;
}
.sp-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(237,232,223,1);
}
.sp-close {
  background: none;
  border: none;
  color: rgba(52,78,98,1);
  cursor: pointer;
  padding: 0.125rem;
  line-height: 1;
  display: flex;
  align-items: center;
  font-family: inherit;
  transition: color 150ms;
}
.sp-close:hover { color: rgba(122,148,170,1); }
.sp-close:focus-visible { outline: 2px solid rgba(201,168,76,0.8); outline-offset: 3px; border-radius: 3px; }

/* Category grid */
.sp-body { padding: 1rem 1.25rem 1.25rem; }
.sp-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.sp-cat {
  padding: 0.75rem 0.875rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  color: rgba(237,232,223,0.52);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.sp-cat:hover {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.13);
  color: rgba(237,232,223,0.88);
}
.sp-cat.is-active {
  background: rgba(201,168,76,0.07);
  border-color: rgba(201,168,76,0.28);
  color: rgba(237,232,223,1);
}
.sp-cat:focus-visible { outline: 2px solid rgba(201,168,76,0.8); outline-offset: 2px; border-radius: 6px; }
.sp-cat__tag {
  display: block;
  font-size: 0.57rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.6);
  margin-bottom: 0.28rem;
}

/* Form area */
.sp-form-area {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: none;
}
.sp-form-area.is-visible { display: block; }

/* Form elements */
.sp-fgroup { margin-bottom: 0.6875rem; }
.sp-flabel {
  display: block;
  font-size: 0.595rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(52,78,98,1);
  margin-bottom: 0.325rem;
}
.sp-input,
.sp-select,
.sp-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  color: rgba(237,232,223,1);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 300;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 200ms, background 200ms;
}
.sp-input::placeholder,
.sp-textarea::placeholder { color: rgba(52,78,98,1); }
.sp-input:focus,
.sp-select:focus,
.sp-textarea:focus {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
}
.sp-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23344E62' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-color: rgba(255,255,255,0.038);
  padding-right: 2rem;
  cursor: pointer;
}
.sp-select option { background: #0A1422; color: rgba(237,232,223,1); }
.sp-textarea { resize: vertical; min-height: 78px; }

/* Extra fields (coach/team only) */
.sp-extra { display: none; }
.sp-extra.is-visible { display: block; }

/* Submit */
.sp-submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 1.5rem;
  background: rgba(237,232,223,1);
  color: rgba(6,12,20,1);
  border: none;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms;
}
.sp-submit:hover { background: rgba(237,232,223,0.85); }
.sp-submit:focus-visible { outline: 2px solid rgba(201,168,76,0.8); outline-offset: 3px; }

/* Success state */
.sp-success {
  display: none;
  padding: 1.75rem 0 0.5rem;
  text-align: center;
}
.sp-success.is-visible { display: block; }
.sp-success__head {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(237,232,223,1);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}
.sp-success__sub {
  font-size: 0.8125rem;
  font-weight: 300;
  color: rgba(122,148,170,1);
  line-height: 1.65;
}

/* Mobile */
@media (max-width: 480px) {
  .support-trigger { bottom: 1rem; right: 1rem; }
  .support-panel   { bottom: 3.75rem; right: 1rem; width: calc(100vw - 2rem); }
}

/* ── Page transition — horizontal slice shutter ──────────────────────────────
   6 spans stack vertically, each covering 1/6 of the viewport. Default state
   is translateX(0) — covering the page. JS slides them to their off-screen
   sides on load (reveal) and back on exit (cover). Alternating left/right
   directions per slice create the shutter-blind / aquatic-panel feel.
   ─────────────────────────────────────────────────────────────────────────── */
.page-transition-slices {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  opacity: 1;
}

.page-transition-slices span {
  flex: 1;
  will-change: transform;
  /* Start covering — JS animates these away on page load */
  transform: translateX(0);
}

/* Even slices: slightly deeper navy for subtle banding depth */
.page-transition-slices span:nth-child(odd) {
  background: linear-gradient(90deg, #020609 0%, #06121e 30%, #0b1d2c 62%, #071422 88%, #020609 100%);
}
.page-transition-slices span:nth-child(even) {
  background: linear-gradient(90deg, #010407 0%, #050f19 30%, #091826 62%, #06101d 88%, #010407 100%);
}

/* Reduced-motion: fade the whole container instead of sliding slices */
@media (prefers-reduced-motion: reduce) {
  .page-transition-slices {
    transition: opacity 90ms linear;
  }
  .page-transition-slices span {
    transform: none !important;
    will-change: opacity;
  }
}
