/* Baltic Support — floating contact bubble */
.bpsw {
  --bpsw-primary: #00447c;
  --bpsw-primary-hover: #003762;
  --bpsw-text: #0d2031;
  --bpsw-muted: #4d6171;
  --bpsw-border: rgba(0, 68, 124, 0.14);
  --bpsw-soft: rgba(0, 68, 124, 0.08);
  position: fixed;
  bottom: 20px;
  z-index: 99990;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  line-height: 1.4;
}
.bpsw--left  { left: 20px; }
.bpsw--right { right: 20px; }

.bpsw *, .bpsw *::before, .bpsw *::after { box-sizing: border-box; }
.bpsw svg { display: block; }

/* Round button */
.bpsw-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
  background: var(--bpsw-primary);
  box-shadow: 0 14px 32px rgba(0, 68, 124, 0.32);
  display: grid;
  place-items: center;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background 180ms;
}
.bpsw-fab:hover { background: var(--bpsw-primary-hover); transform: translateY(-2px); }
.bpsw-fab:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px var(--bpsw-primary); }
.bpsw-fab svg { width: 26px; height: 26px; }
.bpsw-fab-open, .bpsw-fab-close {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 160ms, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.bpsw-fab-close { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.bpsw.is-open .bpsw-fab-open  { opacity: 0; transform: rotate(90deg) scale(0.6); }
.bpsw.is-open .bpsw-fab-close { opacity: 1; transform: none; }

/* Gentle pulse ring until first open */
.bpsw:not(.was-opened) .bpsw-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--bpsw-primary);
  animation: bpsw-pulse 2.4s ease-out 1.5s 3;
  opacity: 0;
}
@keyframes bpsw-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Panel — "explodes" out of the bubble */
.bpsw-panel {
  position: absolute;
  bottom: 76px;
  width: min(340px, calc(100vw - 40px));
  background: #fff;
  color: var(--bpsw-text);
  border: 1px solid var(--bpsw-border);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(5, 32, 61, 0.18);
  padding: 18px;
  opacity: 0;
  transform: scale(0.4) translateY(20px);
  transition: opacity 180ms ease, transform 260ms cubic-bezier(0.34, 1.4, 0.64, 1);
}
.bpsw--left  .bpsw-panel { left: 0;  transform-origin: 30px calc(100% + 46px); }
.bpsw--right .bpsw-panel { right: 0; transform-origin: calc(100% - 30px) calc(100% + 46px); }
.bpsw-panel[hidden] { display: block; visibility: hidden; pointer-events: none; }
.bpsw.is-open .bpsw-panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }

.bpsw-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.bpsw-eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f8190;
}
.bpsw-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--bpsw-text); }
.bpsw-x {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--bpsw-border);
  background: #fff;
  color: var(--bpsw-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.bpsw-x svg { width: 16px; height: 16px; }
.bpsw-x:hover { background: var(--bpsw-soft); }

.bpsw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bpsw-item {
  display: grid;
  grid-template-columns: 42px 1fr 18px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--bpsw-border);
  background: #fff;
  color: var(--bpsw-text) !important;
  text-decoration: none !important;
  transition: background 160ms, border-color 160ms, transform 160ms;
}
.bpsw-item:hover, .bpsw-item:focus-visible {
  background: var(--bpsw-soft);
  border-color: rgba(0, 68, 124, 0.3);
  transform: translateX(2px);
}
.bpsw-item:focus-visible { outline: 2px solid var(--bpsw-primary); outline-offset: 2px; }
.bpsw-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bpsw-soft);
  color: var(--bpsw-primary);
}
.bpsw-item--telegram .bpsw-ic { background: rgba(34, 158, 217, 0.12); color: #1c8ac2; }
.bpsw-item--whatsapp .bpsw-ic { background: rgba(37, 211, 102, 0.14); color: #128c4a; }
.bpsw-txt { display: grid; min-width: 0; }
.bpsw-txt strong { font-size: 15px; font-weight: 800; }
.bpsw-txt span { font-size: 13px; color: var(--bpsw-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpsw-go { color: #9aa9b5; }
.bpsw-go svg { width: 18px; height: 18px; }
.bpsw-foot { margin: 12px 2px 0; font-size: 12.5px; color: #6f8190; text-align: center; }

@media (max-width: 480px) {
  .bpsw { bottom: 14px; }
  .bpsw--left { left: 14px; }
  .bpsw--right { right: 14px; }
  .bpsw-fab { width: 54px; height: 54px; }
  .bpsw-panel { bottom: 68px; width: calc(100vw - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  .bpsw *, .bpsw *::before, .bpsw *::after { transition: none !important; animation: none !important; }
}

@media print { .bpsw { display: none; } }

/* Contact-form status banner (used on the contact page) */
.bp-form-status {
  display: none;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
}
.bp-form-status.is-ok    { display: block; background: #e8f6ee; border: 1px solid #a9dcbf; color: #12512d; }
.bp-form-status.is-error { display: block; background: #fdeeee; border: 1px solid #f0b4b4; color: #7a1d1d; }
