@import "tailwindcss";

/* Leaflet Tile & Map Container Fixes for Tailwind CSS */
.leaflet-container {
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-tile-container img {
  max-width: none !important;
  max-height: none !important;
}

html {
  scroll-behavior: smooth;
}

button,
a,
select,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  cursor: pointer;
}

@layer base {
  :root {
    --font-lexend: 'Lexend', sans-serif;
    --font-noto: 'Noto Sans', sans-serif;
    --rs-ink: #0b0f12;
    --rs-navy: #102630;
    --rs-copy: #53636c;
    --rs-muted: #718188;
    --rs-accent: #ef7d00;
    --rs-accent-soft: #ffd47e;
    --rs-action: #315f70;
    --rs-mist: #dfecef;
    --rs-sky: #edf5f8;
    --rs-cream: #fff8ed;
    --rs-canvas: #f4f8fa;
    --rs-line: rgba(173, 192, 200, 0.34);
    --rs-success-bg: #dcefe4;
    --rs-success: #246845;
    --rs-warning-bg: #fff0d9;
    --rs-warning: #9a570f;
    --rs-danger-bg: #f8e2df;
    --rs-danger: #9a4338;
  }

  html {
    scroll-behavior: smooth;
    font-family: var(--font-lexend), sans-serif;
    background: linear-gradient(180deg, #D8E5ED 0%, #F4F8FA 100%);
    background-attachment: fixed;
  }

  body {
    background: linear-gradient(180deg, #D8E5ED 0%, #F4F8FA 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  /* Force Lottie SVG elements and containers to be completely transparent */
  svg, 
  svg[lottie-svg], 
  .lottie-container,
  .lottie-container svg {
    background-color: transparent !important;
    background: none !important;
  }
}

@layer components {
  .rs-page-surface {
    color: var(--rs-ink);
    background:
      radial-gradient(circle at 88% 9%, rgba(255, 212, 126, 0.2), transparent 25%),
      linear-gradient(145deg, var(--rs-sky) 0%, var(--rs-canvas) 54%, var(--rs-cream) 100%);
  }

  .rs-soft-panel {
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 22px 65px rgba(25, 45, 58, 0.075);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
  }

  .rs-field {
    border: 1px solid var(--rs-line);
    background: rgba(255, 255, 255, 0.66);
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  }

  .rs-field:focus {
    border-color: rgba(239, 125, 0, 0.52);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 212, 126, 0.22);
    outline: none;
  }

  .rs-primary-action {
    background: var(--rs-accent);
    color: var(--rs-ink);
    box-shadow: 0 14px 34px rgba(239, 125, 0, 0.14);
    transition: transform 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
  }

  .rs-primary-action:hover {
    transform: translateY(-2px);
    background: #ff9a2f;
    box-shadow: 0 20px 42px rgba(239, 125, 0, 0.2);
  }

  .rs-secondary-action {
    background: var(--rs-navy);
    color: white;
    transition: transform 220ms ease, background-color 220ms ease;
  }

  .rs-secondary-action:hover {
    transform: translateY(-2px);
    background: #1b3946;
  }
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  display: inline-block;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Custom typography classes */
.font-display-xl {
  font-size: 5rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.font-display-xl-mobile {
  font-size: 3.25rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.font-headline-lg {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.font-headline-lg-mobile {
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-label-caps {
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Glassmorphism Panel Shield */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px -15px rgba(11, 15, 18, 0.07);
}

/* Dashboard liquid-glass actions */
.dashboard-glass-action {
  --glass-x: 50%;
  --glass-y: 50%;
  --glass-lift: 0px;
  --glass-rotate-x: 0deg;
  --glass-rotate-y: 0deg;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(255, 255, 255, 0.24),
    0 12px 34px rgba(25, 45, 58, 0.045);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  transform:
    perspective(900px)
    translate3d(0, var(--glass-lift), 0)
    rotateX(var(--glass-rotate-x))
    rotateY(var(--glass-rotate-y));
  transform-style: preserve-3d;
  transition:
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 320ms ease,
    background 320ms ease,
    box-shadow 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.dashboard-glass-action::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--glass-x) var(--glass-y),
    rgba(255, 255, 255, 0.82) 0,
    rgba(255, 255, 255, 0.34) 18%,
    transparent 54%
  );
  opacity: 0;
  transition: opacity 320ms ease;
}

.dashboard-glass-action::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.28), transparent 34%);
}

.dashboard-glass-action:hover,
.dashboard-glass-action:focus-visible,
.dashboard-glass-action[data-glass-active="true"] {
  --glass-lift: -7px;
  border-color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.27));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(255, 255, 255, 0.34),
    0 24px 52px rgba(25, 45, 58, 0.14),
    0 8px 18px rgba(255, 138, 0, 0.055);
  outline: none;
}

.dashboard-glass-action:hover::before,
.dashboard-glass-action:focus-visible::before,
.dashboard-glass-action[data-glass-active="true"]::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-glass-action {
    transform: none;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  }
}

@keyframes rs-success-pop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.012);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rs-success-pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.82);
  }
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

.rs-success-pop {
  animation: rs-success-pop 460ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.rs-success-pulse {
  animation: rs-success-pulse 900ms ease-out 180ms both;
}

@media (prefers-reduced-motion: reduce) {
  .rs-success-pop,
  .rs-success-pulse {
    animation: none;
  }
}

/* FAQ Accordion Styling */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s ease, opacity 0.25s ease;
}

.accordion-content > div {
  overflow: hidden;
}

.accordion-item.active .accordion-content {
  grid-template-rows: 1fr;
  opacity: 1;
}

.accordion-item .accordion-icon {
  transition: transform 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  background-color: #0B0F12;
  color: #ffffff;
}
