/* Scoped to the loading overlay so it can sit on top of any page. */
#sea-happy-loader {
  --navy: #19345c;
  --orange: #ff6b35;
  --blue: #3a86ff;
  --green: #00b879;
  --purple: #8338ec;
  --yellow: #ffd166;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  overflow: auto;
  font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  color: var(--navy);
  background:
    radial-gradient(circle at 12% 18%, #ffffff 0 3px, transparent 4px),
    radial-gradient(circle at 84% 25%, #ffffff 0 4px, transparent 5px),
    linear-gradient(145deg, #fff8dd 0%, #f0f8ff 54%, #f5eaff 100%);
  background-size: 90px 90px, 130px 130px, auto;
}

#sea-happy-loader *,
#sea-happy-loader *::before,
#sea-happy-loader *::after {
  box-sizing: border-box;
}

#sea-happy-loader .page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 18px 18px;
  position: relative;
}

#sea-happy-loader header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}

#sea-happy-loader .logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--orange);
  display: grid;
  place-items: center;
  color: white;
  font-size: 25px;
  box-shadow: 0 5px 0 #df5428;
}

#sea-happy-loader .brand {
  font-weight: 1000;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: 1px;
}

#sea-happy-loader .brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2.8px;
  color: #55708f;
  text-align: center;
  margin-top: 1px;
}

#sea-happy-loader .card {
  width: min(720px, 100%);
  background: rgba(255, 255, 255, 0.88);
  border: 3px solid white;
  border-radius: 30px;
  padding: clamp(20px, 4vw, 34px);
  text-align: center;
  box-shadow: 0 15px 0 rgba(58, 134, 255, 0.1), 0 22px 55px rgba(25, 52, 92, 0.1);
  position: relative;
  z-index: 2;
}

#sea-happy-loader .eyebrow {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  background: #e9f4ff;
  color: #2865b4;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

#sea-happy-loader h1 {
  font-size: clamp(28px, 5.2vw, 44px);
  line-height: 1.08;
  margin: 15px 0 8px;
}

#sea-happy-loader h1 span {
  color: var(--orange);
}

#sea-happy-loader .sub {
  font-size: clamp(14px, 2.4vw, 17px);
  color: #55708f;
  margin: 0 auto 22px;
  max-width: 480px;
  line-height: 1.5;
}

#sea-happy-loader .bee-stage {
  width: 100%;
  height: 72px;
  position: relative;
  margin: 3px 0 2px;
}

#sea-happy-loader .flight-path {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 35px;
  border-top: 3px dashed #c6d9ee;
}

#sea-happy-loader .bee {
  position: absolute;
  left: 4%;
  top: 10px;
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 4px 1px rgba(25, 52, 92, 0.12));
  transform: scaleX(-1);
  z-index: 2;
  animation: sea-loader-bob 1.2s ease-in-out infinite, sea-loader-fly 6s ease-in-out infinite alternate;
}

@keyframes sea-loader-bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -5px; }
}

@keyframes sea-loader-fly {
  from { left: 4%; }
  to { left: 78%; }
}

#sea-happy-loader[hidden] {
  display: none !important;
}

#sea-happy-loader .progress-wrap {
  height: 18px;
  border-radius: 99px;
  background: #e8eff8;
  padding: 3px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px #c9d7e7;
}

#sea-happy-loader .progress {
  width: 7%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff9f1c, #ff6b35, #8338ec);
  transition: width 0.8s ease;
}

#sea-happy-loader .progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #66809e;
  margin-top: 8px;
}

#sea-happy-loader .quote-box {
  margin: 22px auto 20px;
  padding: 17px 18px;
  border-radius: 20px;
  background: #fff5d6;
  border: 2px dashed #ffd166;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#sea-happy-loader .quote {
  font-size: clamp(17px, 3vw, 21px);
  font-weight: 900;
  line-height: 1.35;
}

#sea-happy-loader .quote-by {
  margin-top: 7px;
  font-size: 12px;
  color: #8a6a20;
  font-weight: 800;
}

#sea-happy-loader .balloon-title {
  font-weight: 1000;
  margin: 0 0 4px;
  font-size: 16px;
}

#sea-happy-loader .balloon-hint {
  color: #6b819b;
  font-size: 12px;
  margin: 0 0 11px;
}

#sea-happy-loader .balloon-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 3px 0 4px;
}

#sea-happy-loader .balloon {
  width: 49px;
  height: 61px;
  border: 0;
  border-radius: 50% 50% 47% 47%;
  position: relative;
  cursor: pointer;
  box-shadow: inset -7px -7px 0 rgba(0, 0, 0, 0.08), inset 6px 5px 0 rgba(255, 255, 255, 0.3), 0 5px 0 rgba(25, 52, 92, 0.08);
  transition: transform 0.15s ease;
  touch-action: manipulation;
}

#sea-happy-loader .balloon::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 21px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid currentColor;
  filter: brightness(0.9);
}

#sea-happy-loader .balloon:hover {
  transform: translateY(-5px) rotate(-4deg);
}

#sea-happy-loader .balloon:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

#sea-happy-loader .balloon.dodge {
  animation: sea-loader-dodge 0.48s ease-in-out;
}

@keyframes sea-loader-dodge {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-20px, -18px) rotate(-15deg); }
  55% { transform: translate(22px, -32px) rotate(15deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#sea-happy-loader .message {
  height: 22px;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 900;
  color: #6c4acb;
}

#sea-happy-loader footer {
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  color: #6e829b;
  text-align: center;
}

#sea-happy-loader .sparkle {
  position: absolute;
  font-size: 20px;
  opacity: 0.65;
  animation: sea-loader-twinkle 2.5s ease-in-out infinite;
}

#sea-happy-loader .s1 { left: 7%; top: 23%; }
#sea-happy-loader .s2 { right: 8%; top: 20%; animation-delay: 0.7s; }
#sea-happy-loader .s3 { left: 12%; bottom: 15%; animation-delay: 1.2s; }
#sea-happy-loader .s4 { right: 11%; bottom: 17%; animation-delay: 0.4s; }

@keyframes sea-loader-twinkle {
  0%, 100% { transform: scale(0.8) rotate(0); opacity: 0.4; }
  50% { transform: scale(1.2) rotate(18deg); opacity: 1; }
}

@media (max-height: 720px) {
  #sea-happy-loader .page { padding-top: 10px; }
  #sea-happy-loader .card { padding: 18px 22px; }
  #sea-happy-loader .quote-box { margin: 12px auto; padding: 12px; min-height: 76px; }
  #sea-happy-loader .sub { margin-bottom: 12px; }
  #sea-happy-loader .bee-stage { height: 58px; }
  #sea-happy-loader .flight-path { top: 29px; }
  #sea-happy-loader .bee { top: 4px; }
  #sea-happy-loader footer { padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #sea-happy-loader *,
  #sea-happy-loader *::before,
  #sea-happy-loader *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
