/* Floating Selene launcher. It uses the same palette as selene-chat.css. */
.slw {
  position: fixed; z-index: 45;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none; /* only the children are clickable */
  font-family: inherit;
}
.slw > * { pointer-events: auto; }

.slw-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e4c48a, #c45c3e 70%);
  color: #1a140c !important; text-decoration: none !important;
  border: 1px solid rgba(244,239,228,.25);
  box-shadow: 0 8px 24px rgba(12,10,22,.55), 0 0 22px rgba(228,196,138,.55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.slw-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 28px rgba(12,10,22,.6), 0 0 30px rgba(228,196,138,.7); }
.slw-btn:focus-visible, .slw-go:focus-visible, .slw-close:focus-visible { outline: 3px solid #e4c48a; outline-offset: 3px; }
.slw-moon { font-size: 26px; line-height: 1; }
/* soft halo, it does not move the layout */
.slw-btn::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(228,196,138,.45); opacity: 0;
  animation: slw-halo 3.2s ease-out 2s 3;
}
@keyframes slw-halo { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }

.slw-teaser {
  position: relative;
  width: min(300px, calc(100vw - 32px));
  padding: 16px 44px 16px 16px;
  border-radius: 22px 22px 6px 22px;
  background: linear-gradient(160deg, #161222, #0c0a16);
  border: 1px solid rgba(228,196,138,.35);
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
  color: #f4efe4; font-size: .95rem; line-height: 1.5;
  animation: slw-in .32s ease-out;
}
.slw-teaser[hidden] { display: none; }
.slw-hi { margin: 0 0 12px; }
.slw-hi strong { color: #fff; }
.slw-go {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 18px; border-radius: 999px;
  background: #e4c48a; color: #1a140c !important; font-weight: 700; text-decoration: none !important;
}
.slw-go:hover { background: #f4efe4; }
.slw-close {
  position: absolute; top: 4px; right: 4px;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: #e4c48a; font-size: 22px; line-height: 1; cursor: pointer;
}
.slw-close:hover { color: #fff; background: rgba(228,196,138,.15); }
@keyframes slw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .slw-btn, .slw-teaser { transition: none; animation: none; }
  .slw-btn::after { animation: none; }
}
@media print { .slw { display: none; } }

/* Cafeomancia's full-width "Preparar meu café" primary sits at the bottom of the
   initial screen on phones; the fixed Selene button would otherwise overlap it.
   Hide the launcher only while that first choosing phase is on screen; it returns
   for every later phase and on every other page. */
@media (max-width: 480px) {
  body:has(.cafe[data-phase="choosing"]) .slw { display: none; }
}
