/* ================================================================
   GalSol — Public Mini Site  |  site.css
   Batch 6 — Standalone visitor stylesheet.
   Zero dependency on dashboard.css.
================================================================ */

/* ── Reset ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--ms-font, 'Plus Jakarta Sans'), sans-serif;
  background: var(--ms-bg, #0a0f1e);
  color: var(--ms-text, #eef4ff);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* ── CSS Variables injected by site ────────────────────── */
:root {
  --ms-accent: #00d4ff;
  --ms-accent-rgb: 0, 212, 255;
  --ms-bg: #0a0f1e;
  --ms-text: #eef4ff;
  --ms-font: 'Plus Jakarta Sans';
  --ms-radius: 14px;
}

/* ── Loading State ─────────────────────────────────────────────
   Three selectable styles (bars | pulse | ring) on either a dark or
   light background. Every colour is driven by two custom properties
   set on .ms-loading-screen, so a single [data-bg] switch restyles
   the whole loader — no per-style light/dark duplication.

   The organiser's logo is optional and may arrive AFTER first paint
   (it lives in the Supabase config). #msLoadLogo therefore starts
   hidden and is revealed by .in — that reveal doubles as the
   loader's exit animation, so a late logo never looks like a stall. */
.ms-loading-screen {
  position: fixed;
  inset: 0;
  background: var(--msl-bg, #08111f);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1000;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  --msl-bg: #08111f;
  --msl-fg: 255, 255, 255;
  --msl-accent: #00d4ff;
}

.ms-loading-screen[data-bg="light"] {
  --msl-bg: #ffffff;
  --msl-fg: 15, 23, 42;
  --msl-accent: #0f172a;
}

.ms-loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Organiser logo — hidden until known, then animates in */
.ms-load-logo {
  max-width: 132px;
  max-height: 84px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.86) translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-load-logo.in {
  opacity: 1;
  transform: none;
}

.ms-loading-text {
  font-size: 13px;
  color: rgba(var(--msl-fg), 0.35);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ── Style 1: bars ── */
.ms-loading-bar-wrap {
  width: 180px;
  height: 3px;
  background: rgba(var(--msl-fg), 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.ms-loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--msl-accent), #7c3aed);
  border-radius: 99px;
  animation: msLoadBar 1.4s ease-in-out infinite;
}

/* ── Style 2: pulse ── */
.ms-load-pulse {
  display: flex;
  gap: 8px;
}

.ms-load-pulse i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--msl-accent);
  animation: msLoadPulse 1.1s ease-in-out infinite;
}

.ms-load-pulse i:nth-child(2) {
  animation-delay: 0.15s;
}

.ms-load-pulse i:nth-child(3) {
  animation-delay: 0.3s;
}

/* ── Style 3: ring ── */
.ms-load-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid rgba(var(--msl-fg), 0.12);
  border-top-color: var(--msl-accent);
  animation: msLoadRing 0.8s linear infinite;
}

@keyframes msLoadBar {
  0% {
    width: 0%;
    margin-left: 0%;
  }

  50% {
    width: 70%;
    margin-left: 15%;
  }

  100% {
    width: 0%;
    margin-left: 100%;
  }
}

@keyframes msLoadPulse {

  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.35;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes msLoadRing {
  to {
    transform: rotate(360deg);
  }
}

/* Respect reduced-motion: keep the loader legible, drop the spin/bounce */
@media (prefers-reduced-motion: reduce) {

  .ms-loading-bar,
  .ms-load-pulse i,
  .ms-load-ring {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }

  .ms-load-logo {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

/* ── Skeleton Blocks ─────────────────────────────────────────── */
.ms-skeleton {
  display: none;
  flex-direction: column;
  gap: 0;
  animation: msSkelFade 0.4s ease both;
}

.ms-skeleton.visible {
  display: flex;
}

@keyframes msSkelFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ms-skel-cover {
  height: 280px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  position: relative;
  overflow: hidden;
}

.ms-skel-section {
  padding: 40px clamp(20px, 5%, 48px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ms-skel-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  animation: msSkelShimmer 1.6s ease-in-out infinite;
}

.ms-skel-line.w-60 {
  width: 60%;
}

.ms-skel-line.w-40 {
  width: 40%;
}

.ms-skel-line.w-80 {
  width: 80%;
}

.ms-skel-line.h-big {
  height: 20px;
}

.ms-skel-line.h-sm {
  height: 9px;
}

@keyframes msSkelShimmer {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.9;
  }
}

/* ── Content Wrapper ─────────────────────────────────────────── */
#ms-content {
  display: none;
  animation: msContentIn 0.5s ease both;
  /* No overflow:hidden here — sticky nav needs a scrollable ancestor */
}

#ms-content.visible {
  display: block;
}

/* ── Navigation block ────────────────────────────────────────── */
/* Float layout: a zero-height sticky wrapper holds the nav pill position:absolute.
   overflow:visible on that wrapper lets the mobile dropdown extend below freely. */
.ms-nav {
  box-sizing: border-box;
}

body {
  overflow-x: hidden; /* prevent horizontal scroll from floating nav side margins */
}

.ms-nav a:hover {
  opacity: 1 !important;
}

.ms-nav-minimal a:hover,
.ms-nav-centered a:hover {
  background: rgba(255,255,255,0.08) !important;
}

.ms-nav-bold a:hover {
  background: rgba(255,255,255,0.15) !important;
}

@keyframes msContentIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Powered-by header bar ───────────────────────────────────── */
.ms-topbar {
  height: 42px;
  background: var(--ms-topbar-bg, rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ms-topbar-border, rgba(255, 255, 255, 0.07));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4%, 40px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.ms-topbar-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.ms-topbar-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.ms-topbar-name {
  font-family: var(--ms-font-display, 'Syne'), sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ms-topbar-text, rgba(255, 255, 255, 0.6));
}

.ms-topbar-name span {
  color: var(--ms-accent, #00d4ff);
}

.ms-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ms-topbar-reg-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid;
}

.ms-topbar-reg-badge.open {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.ms-topbar-reg-badge.closed {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.2);
  color: #fca5a5;
}

.ms-topbar-reg-badge .reg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: regPulse 2.5s ease infinite;
}

.ms-topbar-reg-badge.closed .reg-dot {
  animation: none;
}

@keyframes regPulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 4px currentColor;
  }

  50% {
    opacity: 0.45;
    box-shadow: none;
  }
}

.ms-topbar-share-btn {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(var(--ms-accent-rgb, 0, 212, 255), 0.1);
  border: 1px solid rgba(var(--ms-accent-rgb, 0, 212, 255), 0.2);
  color: var(--ms-accent, #00d4ff);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ms-topbar-share-btn:hover {
  background: rgba(var(--ms-accent-rgb, 0, 212, 255), 0.18);
}

.ms-topbar-share-btn svg {
  width: 12px;
  height: 12px;
}

/* ── 404 / Error State ───────────────────────────────────────── */
.ms-error-page {
  display: none;
  min-height: calc(100vh - 42px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px 24px;
  text-align: center;
  gap: 16px;
}

.ms-error-page.visible {
  display: flex;
}

.ms-error-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ms-error-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.12;
}

.ms-error-orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--ms-accent, #00d4ff), transparent);
  top: -80px;
  left: -80px;
}

.ms-error-orb-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #7c3aed, transparent);
  bottom: -60px;
  right: -60px;
}

.ms-error-code {
  font-family: var(--ms-font-display, 'Syne'), sans-serif;
  font-size: clamp(72px, 15vw, 120px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--ms-accent, #00d4ff), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.ms-error-title {
  font-family: var(--ms-font-display, 'Syne'), sans-serif;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--ms-text, #eef4ff);
  position: relative;
  z-index: 1;
}

.ms-error-sub {
  font-size: clamp(14px, 2.5vw, 16px);
  color: rgba(255, 255, 255, 0.45);
  max-width: 400px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.ms-error-btn {
  margin-top: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ms-accent, #00d4ff), #7c3aed);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.2);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ms-error-btn:hover {
  box-shadow: 0 8px 36px rgba(0, 212, 255, 0.35);
  transform: translateY(-2px);
}

.ms-error-btn svg {
  width: 15px;
  height: 15px;
}

/* ── Scroll-to-top button ────────────────────────────────────── */
#ms-scroll-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(var(--ms-accent-rgb, 0, 212, 255), 0.12);
  border: 1px solid rgba(var(--ms-accent-rgb, 0, 212, 255), 0.25);
  color: var(--ms-accent, #00d4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  z-index: 90;
  backdrop-filter: blur(12px);
}

#ms-scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#ms-scroll-top:hover {
  background: rgba(var(--ms-accent-rgb, 0, 212, 255), 0.22);
  box-shadow: 0 4px 20px rgba(var(--ms-accent-rgb, 0, 212, 255), 0.25);
}

#ms-scroll-top svg {
  width: 16px;
  height: 16px;
}

/* ── Share toast ─────────────────────────────────────────────── */
#ms-share-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(var(--ms-accent-rgb, 0, 212, 255), 0.25);
  color: var(--ms-accent, #00d4ff);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 999;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 7px;
}

#ms-share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#ms-share-toast svg {
  width: 14px;
  height: 14px;
}

/* ── Footer ──────────────────────────────────────────────────── */
/* One row: legal left, attribution right. The border-top now lives on the
   row so both halves sit inside a single rule, not two stacked bands. */
.ms-footer-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(12px, 4%, 40px);
  margin-top: 40px;
  border-top: 1px solid var(--ms-footer-border, rgba(255, 255, 255, 0.06));
}

.ms-footer-legal {
  font-size: 11.5px;
  line-height: 1.7;
  text-align: left;
  color: var(--ms-footer-text, rgba(255, 255, 255, 0.25));
  min-width: 0;
}

.ms-footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.ms-footer-legal a:hover {
  opacity: 0.7;
}

.ms-footer {
  padding: 0;
  border-top: none;
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--ms-footer-text, rgba(255, 255, 255, 0.25));
}

.ms-footer a {
  color: rgba(var(--ms-accent-rgb, 0, 212, 255), 0.7);
  font-weight: 600;
  transition: color 0.15s;
}

.ms-footer a:hover {
  color: var(--ms-accent, #00d4ff);
}

.ms-footer-logo {
  height: 18px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.ms-footer a:hover .ms-footer-logo {
  opacity: 1;
}

.ms-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ms-footer-text, rgba(255, 255, 255, 0.25));
  opacity: 0.6;
}

/* Too much text for one row on a phone — stack and centre it again. */
@media (max-width: 760px) {
  .ms-footer-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
  }

  .ms-footer-legal {
    text-align: center;
  }

  .ms-footer {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .ms-footer-row {
    padding: 16px 10px;
  }

  .ms-footer,
  .ms-footer-legal {
    font-size: 10.5px;
  }

  .ms-footer {
    gap: 5px;
  }

  .ms-footer-logo {
    height: 14px;
  }

  .ms-footer-dot,
  .ms-footer>a:last-child {
    display: none;
  }
}

/* ── FAQ details animation ───────────────────────────────────── */
details>summary {
  cursor: pointer;
  user-select: none;
}

details[open]>summary svg {
  transform: rotate(180deg);
}

details>summary svg {
  transition: transform 0.22s ease;
}

/* ── Form elements — public override ────────────────────────── */
input,
select,
textarea {
  font-family: var(--ms-font, 'Plus Jakarta Sans'), sans-serif;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ms-accent, #00d4ff) !important;
  box-shadow: 0 0 0 3px rgba(var(--ms-accent-rgb, 0, 212, 255), 0.12) !important;
}

[aria-invalid="true"] {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12) !important;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ms-topbar-name {
    display: none;
  }

  #ms-scroll-top {
    bottom: 20px;
    right: 16px;
  }

  .ms-footer {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
  }
}

/* ── GLOBAL UI CLEANUP ── */
/* 1. Remove Breadcrumbs from all pages */
.page-breadcrumb {
  display: none !important;
}

/* 2. Remove the Sticky Scrolling Top Bars from the 3 Tools */
.tool-header.sticky,
header.scrolled,
.sticky-top-bar,
.tool-top-bar.scrolled {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Fix Mail Tool AI Panel Glitch */
.me-ai-panel,
.gal-ai-box {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ── Small laptop (1024–1366 px): auto 90% scale ── */
@media screen and (max-width: 1366px) and (min-width: 1024px) {
  html { zoom: 0.9; }
}