/* =====================================================================
   AutoHive estate frame: BEE widget + social rail.
   Part of the standard page frame on every estate page, alongside the
   services banner (autohive-services-menu) and the estate footer.

   Tint per division with --ah-bee-accent on :root; falls back to the
   page's --ah-consent-accent, then AutoHive gold. The bee inside the
   hexagons is the official gold-on-white mark, never recoloured
   (Brand Guide: the bee keeps its four approved colourways).
   ===================================================================== */

.bee-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1500;
  display:flex; align-items:center; gap:.55rem;
  background: var(--ah-bee-accent, var(--ah-consent-accent, #F5A623));
  color:#fff; border:none; cursor:pointer;
  padding: .75rem 1.1rem; border-radius: 999px;
  font-family:'Lato',Arial,sans-serif; font-weight:900; font-size:.9rem;
  box-shadow: 0 12px 30px -8px rgba(10,31,68,0.45);
  transition: transform .2s ease, filter .2s ease;
}
.bee-fab:hover { transform: translateY(-2px); filter: brightness(.9); }
.bee-fab__hex {
  width: 30px; height: 30px; background:#fff;
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display:flex; align-items:center; justify-content:center;
}
.bee-fab__hex img { width: 22px; height: 22px; object-fit: contain; }
@media (max-width:600px){ .bee-fab__label{ display:none; } .bee-fab{ padding:.85rem; } }

.bee-overlay { position: fixed; inset:0; z-index: 1600; background: rgba(10,31,68,0.55);
  display:none; align-items:flex-end; justify-content:flex-end; padding: 1rem; }
.bee-overlay.open { display:flex; }
@media (min-width:640px){ .bee-overlay { padding: 1.5rem; } }

.bee-modal {
  width: 100%; max-width: 420px; max-height: 86vh; display:flex; flex-direction:column;
  background: #0A1F44; border-radius: 1rem; overflow:hidden;
  border-top: 4px solid var(--ah-bee-accent, var(--ah-consent-accent, #F5A623));
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6);
}
.bee-head { display:flex; align-items:center; gap:.75rem; padding:1rem 1.1rem;
  border-bottom:1px solid rgba(255,255,255,0.1); }
.bee-avatar { width:44px; height:44px; flex:none; background:#fff;
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display:flex; align-items:center; justify-content:center;
  box-shadow: inset 0 0 0 2px var(--ah-bee-accent, var(--ah-consent-accent, #F5A623)); }
.bee-avatar img { width: 30px; height: 30px; object-fit: contain; }
.bee-head h2 { font-family:'Lato',Arial,sans-serif; font-weight:900; color:#fff; font-size:1rem; margin:0; }
.bee-head p { font-size:.72rem; color: #F5A623; margin:0; }
.bee-close { margin-left:auto; background:none; border:none; color:#fff; cursor:pointer; padding:.3rem; }
.bee-close svg { width:22px; height:22px; }

.bee-body { padding: 1rem 1.1rem; overflow-y:auto; flex:1; display:flex; flex-direction:column; gap:.75rem; }
.bee-bubble { max-width: 85%; padding:.7rem .9rem; border-radius:.9rem; font-size:.88rem; line-height:1.5;
  font-family:'Lato',Arial,sans-serif; }
.bee-bubble--bee { align-self:flex-start; background: rgba(255,255,255,0.08); color:#fff; border-bottom-left-radius:.2rem; }
.bee-bubble--user { align-self:flex-end; color:#fff; border-bottom-right-radius:.2rem;
  background: var(--ah-bee-accent, var(--ah-consent-accent, #F5A623)); }
.bee-cta { display:inline-flex; align-items:center; justify-content:center; gap:.4rem;
  background: #F5A623; color: #0A1F44; font-family:'Lato',Arial,sans-serif;
  font-weight:900; font-size:.85rem; padding:.65rem 1rem; border-radius:.55rem; border:none;
  cursor:pointer; text-decoration:none; }
.bee-body .bee-cta { margin-top:.4rem; align-self:flex-start; }
.bee-consent { display:flex; align-items:flex-start; gap:.55rem; font-size:.75rem;
  color: rgba(255,255,255,0.78); line-height:1.45; padding:.25rem .1rem;
  font-family:'Lato',Arial,sans-serif; }
.bee-consent input { margin-top:.2rem; width:1rem; height:1rem; flex-shrink:0;
  accent-color: var(--ah-bee-accent, var(--ah-consent-accent, #F5A623)); }
.bee-consent a { color: #F5A623; }
.bee-error { font-size:.75rem; color:#ff8aa8; min-height:1rem; margin:0; padding:.15rem .1rem 0; }
.bee-foot { padding:.7rem 1.1rem; border-top:1px solid rgba(255,255,255,0.1);
  font-size:.68rem; color: rgba(255,255,255,0.55); font-family:'Lato',Arial,sans-serif; }
.bee-foot a { color: #F5A623; text-decoration: underline; }

.bee-typing { align-self: flex-start; display: inline-flex; gap: 4px;
  background: rgba(255,255,255,0.08); padding: .6rem .8rem;
  border-radius: .9rem; border-bottom-left-radius: .2rem; }
.bee-typing span { width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.6); animation: beeTyping 1.2s infinite ease-in-out; }
.bee-typing span:nth-child(2) { animation-delay: .15s; }
.bee-typing span:nth-child(3) { animation-delay: .30s; }
@keyframes beeTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40%           { transform: translateY(-3px); opacity: 1; }
}
@media (prefers-reduced-motion:reduce){ .bee-typing span { animation:none; } }

.bee-chip-row { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem 1.1rem .75rem;
  max-height: 30vh; overflow-y: auto; border-top: 1px solid rgba(255,255,255,0.08); margin-top: .25rem; }
.bee-chip-row:empty { display: none; padding: 0; border-top: none; margin-top: 0; }
.bee-chip { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; padding: .45rem .75rem; border-radius: 999px;
  font-size: .78rem; cursor: pointer; font-family:'Lato',Arial,sans-serif;
  transition: border-color .15s ease, background .15s ease; }
.bee-chip:hover, .bee-chip:focus-visible { background: rgba(255,255,255,0.14);
  border-color: var(--ah-bee-accent, var(--ah-consent-accent, #F5A623)); outline: none; }

.bee-input-row { display: flex; gap: .5rem; align-items: center;
  padding: .6rem 1.1rem .75rem; border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.18); }
.bee-input-row input { flex: 1; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18); color: #fff; padding: .6rem .85rem;
  border-radius: 999px; font-family:'Lato',Arial,sans-serif; font-size: .9rem; }
.bee-input-row input::placeholder { color: rgba(255,255,255,0.45); }
.bee-input-row input:focus { outline: none;
  border-color: var(--ah-bee-accent, var(--ah-consent-accent, #F5A623));
  background: rgba(255,255,255,0.1); }
.bee-send { flex: none; width: 40px; height: 40px; color: #fff;
  background: var(--ah-bee-accent, var(--ah-consent-accent, #F5A623));
  border: none; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: filter .15s ease, transform .15s ease; }
.bee-send:hover { filter: brightness(.9); transform: translateY(-1px); }
.bee-send svg { width: 18px; height: 18px; }

/* ---------- the idle nudge: the bee flies out and offers help ---------- */
.bee-flyer { position: fixed; z-index: 1550; width: 62px; height: 94px;
  object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(10,31,68,.35)); }
.bee-flyer.is-flying { animation: ahBeeFly 2.8s cubic-bezier(.45,.05,.35,1) forwards; }
.bee-flyer.is-hover { animation: ahBeeHover 2.4s ease-in-out infinite; }
.bee-flyer.is-out { transition: opacity .45s ease, transform .45s ease;
  opacity: 0; transform: translateY(-18px) scale(.8); }
@keyframes ahBeeFly {
  0%   { transform: translate(0,0) rotate(0deg); }
  22%  { transform: translate(calc(var(--bx) * .30), calc(var(--by) * .55)) rotate(-16deg); }
  48%  { transform: translate(calc(var(--bx) * .62), calc(var(--by) * .72)) rotate(12deg); }
  74%  { transform: translate(calc(var(--bx) * .86), calc(var(--by) * 1.06)) rotate(-8deg); }
  100% { transform: translate(var(--bx), var(--by)) rotate(0deg); }
}
@keyframes ahBeeHover {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-7px) rotate(3deg); }
}
.bee-nudge { position: fixed; z-index: 1555; max-width: 270px;
  background: #0A1F44; color: #fff; border-radius: 14px; border-top-left-radius: 4px;
  border: 1px solid var(--ah-bee-accent, var(--ah-consent-accent, #F5A623));
  box-shadow: 0 18px 44px rgba(10,31,68,.4);
  padding: 14px 16px; font-family:'Lato',Arial,sans-serif;
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease; }
.bee-nudge.is-in { opacity: 1; transform: translateY(0); }
.bee-nudge p { margin: 0 0 10px; font-size: .92rem; line-height: 1.5; }
.bee-nudge__links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.bee-nudge__links a { display: inline-block; padding: 4px 11px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: .74rem;
  font-weight: 700; text-decoration: none; }
.bee-nudge__links a:hover { border-color: #F5A623; color: #F5A623; }
.bee-nudge__row { display: flex; gap: 10px; align-items: center; }
.bee-nudge .bee-cta { padding: .5rem .9rem; font-size: .82rem; }
.bee-nudge__no { background: none; border: none; color: rgba(255,255,255,.65);
  font: inherit; font-size: .8rem; cursor: pointer; text-decoration: underline; }
.bee-nudge__no:hover { color: #fff; }
@media (prefers-reduced-motion:reduce) {
  .bee-flyer.is-flying, .bee-flyer.is-hover { animation: none; }
}

/* ---------- social rail, the other side of the page ---------- */
.social-rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%);
  z-index: 1400; display: flex; flex-direction: column; gap: 10px; }
.social-rail a, .social-rail .is-soon { display: grid; place-items: center;
  width: 44px; height: 44px; position: relative;
  background: #fff; border: 1px solid #E3E8F0; border-radius: 12px;
  box-shadow: 0 6px 18px rgba(10,31,68,.12);
  transition: transform .15s ease, box-shadow .15s ease; }
.social-rail a:hover, .social-rail a:focus-visible { transform: translateX(3px);
  box-shadow: 0 10px 24px rgba(10,31,68,.2); }
.social-rail .is-soon { opacity: .45; }
.social-rail .is-soon img { filter: grayscale(1); }
.social-rail img, .social-rail svg { width: 22px; height: 22px; }
.social-rail svg { color: var(--ah-bee-accent, var(--ah-consent-accent, #F5A623)); }
.social-rail .rail-label { position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; }
@media (max-width: 1180px) { .social-rail { display: none; } }
