/* Interactive allergen flower — web port of the app's AllergenFlowerModal. */
.flower-overlay { position: fixed; inset: 0; z-index: 1000; display: none; }
.flower-overlay.show { display: block; }

.flower-scrim { position: absolute; inset: 0; background: rgba(16, 10, 8, 0.92); opacity: 0; transition: opacity .4s ease; }
.flower-overlay.open .flower-scrim { opacity: 1; }

.flower-close {
  position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.16); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; z-index: 30; display: flex; align-items: center; justify-content: center;
}
.flower-close:hover { background: rgba(255,255,255,0.28); }

.flower-hint {
  position: absolute; left: 0; right: 0; text-align: center; z-index: 25;
  color: rgba(255,255,255,0.85); font-weight: 600; font-size: 14px;
  top: calc(50% - min(41vw, 180px) - 46px);
  opacity: 0; transition: opacity .3s ease;
}
.flower-overlay.bloomed:not(.sheet-open) .flower-hint { opacity: 1; }

.flower-stagewrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.flower-stage {
  position: relative; width: min(82vw, 360px); height: min(82vw, 360px);
  pointer-events: auto; opacity: 0;
}
.flower-overlay.open .flower-stage { opacity: 1; }
.flower-stage.blooming { animation: flowerBloom 1.2s cubic-bezier(.2,.7,.2,1) forwards; }
.flower-overlay.sheet-open .flower-stage { transform: translateY(-15vh) scale(.62); transition: transform .35s cubic-bezier(.2,.7,.2,1); }

.flower-breathe { position: absolute; inset: 0; }
.flower-overlay.bloomed .flower-breathe { animation: flowerBreathe 3.4s ease-in-out infinite; }

.flower-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }

.petal {
  position: absolute; width: 23%; height: 23%; border-radius: 50%;
  transform: translate(-50%, -50%); cursor: pointer;
  appearance: none; -webkit-appearance: none; border: none; padding: 0;
  background: transparent; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, box-shadow .15s ease;
}
.petal:hover {
  background: rgba(255,255,255,0.16);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.55) inset;
}
/* Same bug as the form inputs had: `outline: none` here removed the only
   keyboard indicator. A single-colour ring cannot work on a petal, because the
   thing behind it is a different bright colour every time — so the ring is
   white with a black ring immediately outside it. The two always contrast with
   each other (21:1), whatever colour the petal underneath happens to be. */
.petal:focus-visible {
  background: rgba(255,255,255,0.16);
  outline: 3px solid #fff; outline-offset: 0;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.8), 0 0 0 2px rgba(255,255,255,0.55) inset;
}

@keyframes flowerBloom {
  0%   { opacity: 0; transform: translateY(-80px) rotate(0deg) scale(0.15); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) rotate(1080deg) scale(1); }
}
@keyframes flowerBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* Fact sheet */
.flower-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 28;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 22px calc(28px + env(safe-area-inset-bottom)); max-height: 64%; overflow-y: auto;
  transform: translateY(110%); transition: transform .35s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
}
.flower-overlay.sheet-open .flower-sheet { transform: translateY(0); }
.sheet-handle { width: 42px; height: 4px; border-radius: 2px; background: var(--border); margin: 4px auto 16px; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.sheet-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; flex: 0 0 auto; }
.sheet-title { flex: 1; font-size: 22px; font-weight: 800; margin: 0; color: var(--text); }
.sheet-x { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--coral); color: #fff; font-size: 17px; cursor: pointer; }
.sheet-label { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--subtle); margin: 18px 0 6px; }
.sheet-why { font-size: 15px; line-height: 1.55; color: var(--text); margin: 0; }
.sheet-fact { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; }
.sheet-fact .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: 0 0 auto; }
.sheet-fact span { font-size: 15px; line-height: 1.45; color: var(--text); }
.sheet-disc { font-size: 12.5px; line-height: 1.55; color: var(--muted); font-style: italic; margin-top: 16px; }

/* Trigger affordances */
/* The logo trigger is a real <button> now (it used to be an <img role="button">
   whose alt duplicated the brand link beside it). Strip the button chrome so it
   still looks like a bare logo. */
.brand-logo { cursor: pointer; transition: transform .12s ease; }
button.brand-logo {
  appearance: none; -webkit-appearance: none; border: none; background: none;
  padding: 0; margin: 0; line-height: 0; display: block; flex-shrink: 0;
}
button.brand-logo img { width: 36px; height: 36px; }
.brand-logo:hover { transform: scale(1.08) rotate(-6deg); }
.logo-hint {
  appearance: none; -webkit-appearance: none; border: none; cursor: pointer; font-family: inherit;
  background: var(--coral-tint); color: var(--coral-dark); font-weight: 800; font-size: 12.5px;
  padding: 5px 11px; border-radius: 999px; margin-left: 6px; white-space: nowrap;
  animation: hintWiggle 1.4s ease-in-out infinite;
}
.logo-hint:hover { background: var(--coral); color: #fff; }
@keyframes hintWiggle { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }
.flowerlink {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  background: none; border: none; cursor: pointer; color: var(--coral-dark);
  font-weight: 700; font-size: 15px; font-family: inherit; padding: 0;
}
.flowerlink:hover { text-decoration: underline; }
.flowerlink .bud { animation: flowerBreathe 2.6s ease-in-out infinite; }
