/* AllAroundMe shared styles — RTL Hebrew, mobile-first. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Heebo", Arial, sans-serif;
  /* direction follows <html dir> — he/ar are rtl, en/ru ltr (see js/i18n.js) */
  color: #123;
  min-height: 100vh;
  background: #fdfefe;
  overflow-x: hidden;
}

/* ---- the general trembling-waves background ------------------------------ */
.aam-waves {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #fdfefe;
}
.aam-waves::before, .aam-waves::after {
  content: ''; position: absolute; left: -25%; width: 150%; height: 60vh;
  border-radius: 45%;
  background: radial-gradient(ellipse at center, rgba(120,190,230,.16), rgba(120,190,230,.05) 60%, transparent 70%);
  animation: aamWave 9s ease-in-out infinite alternate;
}
.aam-waves::before { bottom: -28vh; }
.aam-waves::after {
  bottom: -34vh; height: 70vh;
  background: radial-gradient(ellipse at center, rgba(210,80,80,.10), rgba(210,80,80,.03) 60%, transparent 70%);
  animation-duration: 12s; animation-delay: -4s;
}
@keyframes aamWave {
  0%   { transform: translateX(-2.5%) translateY(0) rotate(-1deg); }
  50%  { transform: translateX(2%) translateY(-1.6vh) rotate(1deg); }
  100% { transform: translateX(-1%) translateY(1vh) rotate(-.6deg); }
}
/* the subtle whole-screen tremble used during the splash */
.aam-tremble { animation: aamTremble .35s linear infinite; }
@keyframes aamTremble {
  0% { transform: translate(0,0); } 25% { transform: translate(.6px,-.4px); }
  50% { transform: translate(-.5px,.5px); } 75% { transform: translate(.4px,.6px); }
  100% { transform: translate(0,0); }
}

/* ---- splash ---------------------------------------------------------------- */
#aam-splash {
  position: fixed; inset: 0; z-index: 1000; background: #fdfefe;
  display: flex; flex-direction: column; padding: 10vh 8vw;
  direction: ltr; text-align: left;
}
#aam-splash .line1 {
  font-size: clamp(22px, 5.5vw, 44px); font-weight: 200; letter-spacing: .14em;
  color: #1b3a52; min-height: 1.4em; white-space: pre;
}
#aam-splash .line2 {
  margin-top: .7em;
  font-size: clamp(15px, 3.6vw, 26px); font-weight: 300;
  letter-spacing: .32em; text-transform: lowercase; color: #33607f;
  min-height: 1.5em; display: flex; align-items: center; flex-wrap: wrap; gap: .1em;
}
#aam-splash .word { opacity: 0; transition: opacity .8s; }
#aam-splash .word.on { opacity: 1; }
/* the C with a living eye inside, later morphs into "C's" */
.eye-c { position: relative; display: inline-block; width: 1.15em; }
.eye-c .c-char { position: relative; z-index: 1; }
.eye-c .pupil {
  position: absolute; top: 52%; left: 56%; width: .28em; height: .28em;
  background: #16344a; border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: aamLook 2.4s ease-in-out infinite, aamBlink 3.7s linear infinite;
}
@keyframes aamLook {
  0%, 100% { margin-left: 0; } 30% { margin-left: .12em; }
  60% { margin-left: -.12em; } 80% { margin-top: .07em; }
}
@keyframes aamBlink { 0%, 92%, 100% { transform: translate(-50%,-50%) scaleY(1); } 95% { transform: translate(-50%,-50%) scaleY(.08); } }
.eye-c .s-tail { opacity: 0; transition: opacity .9s; }
.eye-c.morphed .pupil { opacity: 0; transition: opacity .9s; }
.eye-c.morphed .s-tail { opacity: 1; }
#aam-splash .target { font-size: 1.2em; animation: aamPulse 1.6s ease-in-out infinite; display: inline-block; }
@keyframes aamPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
/* the splash itself is always ltr (the english movie text); the skip buttons
   follow the reader's language */
#aam-splash .skip-row {
  margin-top: auto; direction: rtl; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
html[dir="ltr"] #aam-splash .skip-row { direction: ltr; }
#aam-splash .skip-row button {
  border: 1px solid #b9cddb; background: #fff; color: #33607f;
  padding: 10px 18px; border-radius: 22px; font-size: 15px; cursor: pointer;
}

/* ---- layout / cards / buttons ---------------------------------------------- */
.aam-page { max-width: 560px; margin: 0 auto; padding: 18px 16px 90px; }
.aam-brand { text-align: center; margin: 8px 0 4px; }
.aam-brand .en { font-size: 13px; letter-spacing: .22em; color: #5a86a5; text-transform: lowercase; direction: ltr; }
.aam-brand h1 { margin: 2px 0 0; font-size: 30px; color: #16344a; }
.aam-brand .he { color: #a33; font-size: 15px; }

.aam-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  border: 1px solid #d5e4ee; background: #ffffffee; color: #16344a;
  padding: 16px; margin: 10px 0; border-radius: 18px;
  font-size: 18px; text-align: start; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 10px rgba(30,80,120,.06);
  transition: transform .12s, box-shadow .12s;
}
.aam-btn .ic { font-size: 26px; }
.aam-btn small { display: block; color: #6b8ba3; font-size: 13px; }
.aam-btn:active, .aam-pressed { transform: scale(.965); box-shadow: 0 1px 4px rgba(30,80,120,.12); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #cfe0eb; background: #fff; color: #2a5878;
  border-radius: 18px; padding: 8px 14px; margin: 4px 3px; font-size: 15px; cursor: pointer;
}
.chip.on { background: #16649e; border-color: #16649e; color: #fff; }
.card {
  background: #fff; border: 1px solid #e2ecf3; border-radius: 16px;
  padding: 14px; margin: 10px 0; box-shadow: 0 2px 8px rgba(30,80,120,.05);
}

/* ---- press burst (target-rings motif) -------------------------------------- */
.aam-burst {
  position: fixed; z-index: 2000; width: 14px; height: 14px; pointer-events: none;
  border: 2px solid rgba(200,40,40,.75); border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: aamBurst .55s ease-out forwards;
}
.aam-burst-out { border-color: rgba(30,120,200,.6); animation-duration: .45s; }
@keyframes aamBurst {
  0% { opacity: .9; box-shadow: 0 0 0 0 rgba(200,40,40,.35), 0 0 0 0 rgba(200,40,40,.2); }
  100% { opacity: 0; width: 58px; height: 58px;
         box-shadow: 0 0 0 14px rgba(200,40,40,0), 0 0 0 30px rgba(200,40,40,0); }
}
.aam-press-gif {
  position: fixed; z-index: 2000; width: 64px; height: 64px; pointer-events: none;
  transform: translate(-50%, -50%); border-radius: 12px;
  animation: aamGifPop .6s ease-out forwards;
}
@keyframes aamGifPop { 0% { opacity: 0; scale: .6; } 20% { opacity: 1; } 100% { opacity: 0; scale: 1.15; } }

/* ---- sound widget ----------------------------------------------------------- */
.aam-sound-widget {
  position: fixed; bottom: 12px; left: 12px; z-index: 900;
  display: flex; align-items: center; gap: 8px; direction: ltr;
  background: #ffffffe6; border: 1px solid #d8e6ef; border-radius: 24px; padding: 6px 12px;
  box-shadow: 0 2px 10px rgba(30,80,120,.12);
}
.aam-sound-widget .aam-mute { border: 0; background: none; font-size: 20px; cursor: pointer; padding: 2px; }
.aam-sound-widget .aam-vol { width: 84px; accent-color: #16649e; }

/* stars */
.stars { direction: ltr; display: inline-flex; gap: 2px; font-size: 26px; cursor: pointer; user-select: none; }
.stars span { color: #cdd9e2; }
.stars span.on { color: #f5a623; }

.aam-badge-toast {
  position: fixed; top: 14px; right: 14px; z-index: 1500;
  background: #16344a; color: #fff; border-radius: 14px; padding: 12px 16px;
  font-size: 15px; box-shadow: 0 4px 18px rgba(0,0,0,.25);
  animation: aamToast 4s forwards;
}
@keyframes aamToast { 0% { opacity: 0; transform: translateY(-12px); } 8%,85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.muted { color: #7a94a8; font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea, select {
  width: 100%; border: 1px solid #cfe0eb; border-radius: 10px; padding: 10px; font-size: 16px;
  font-family: inherit; background: #fff; color: #123;
}

/* ---- review trust ---------------------------------------------------------- */
.verified-pill {
  display: inline-block; font-size: 12px; color: #1c7a43; background: #e8f7ee;
  border: 1px solid #bfe6cd; border-radius: 10px; padding: 1px 8px; margin-inline-start: 6px;
}
.doc-reply {
  margin-top: 8px; padding: 8px 10px; border-inline-start: 3px solid #16649e;
  background: #f2f8fc; border-radius: 8px; font-size: 14px;
}
.flag-btn { border: 0; background: none; color: #a0b4c2; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.flag-btn:hover { color: #c33; }

/* ---- language switcher ------------------------------------------------------ */
.aam-lang-select {
  width: auto; font-size: 13px; padding: 4px 8px; border-radius: 12px; margin-top: 4px;
}

/* ---- accessibility ---------------------------------------------------------- */
:focus-visible { outline: 3px solid #16649e; outline-offset: 2px; border-radius: 6px; }
.chip:focus-visible { outline-color: #a33; }

@media (prefers-reduced-motion: reduce) {
  .aam-waves::before, .aam-waves::after, .aam-tremble,
  #aam-splash .target, .eye-c .pupil { animation: none !important; }
  .aam-burst, .aam-press-gif { display: none !important; }
  #aam-splash .word { transition: none; }
  .aam-btn { transition: none; }
  * { scroll-behavior: auto !important; }
}
