/* Плаващата група долу вдясно: „Попитай ни“, прозорецът му и „Към началото“.
   --float-bottom се задава от js/to-top.js: когато Netlify показва значката „Powered by Netlify“ в ъгъла,
   цялата група се вдига над нея с 12 px разстояние; без значка остава стандартният отстъп. */
:root { --float-bottom: max(1rem, env(safe-area-inset-bottom)); --float-gap: 12px; }
.ask-fab { bottom: var(--float-bottom); }
.ask { bottom: calc(var(--float-bottom) + var(--ask-fab-h, 52px) + var(--float-gap)); max-height: calc(100% - var(--float-bottom) - var(--ask-fab-h, 52px) - var(--float-gap) - 1rem); }

/* „Към началото“ — малък кръгъл бутон над „Попитай ни“, в цветовете на GEORIS MOBILE (тъмносиньо, златно, кремаво) */
.to-top {
  position: fixed; right: 1rem; z-index: 240;
  bottom: calc(var(--float-bottom) + var(--ask-fab-h, 52px) + var(--float-gap));
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 2px solid #b08d3c; border-radius: 50%; background: #0b1b34; color: #f8efd9;
  cursor: pointer; box-shadow: 0 8px 22px rgba(11, 27, 52, 0.3);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.to-top svg { width: 22px; height: 22px; color: #d2b25f; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s, background-color 0.2s ease; }
.to-top:hover { background: #12294d; }
.to-top:focus-visible { outline: 3px solid #175cff; outline-offset: 2px; }
.to-top[hidden] { display: none; }
/* място в долната част, за да не закрива групата последния ред на страницата */
.site-footer { padding-bottom: calc(var(--float-bottom) + 7rem); }
@media (max-width: 720px) {
  .ask { bottom: calc(var(--float-bottom) + var(--ask-fab-h, 48px) + var(--float-gap)); max-height: calc(100% - var(--float-bottom) - var(--ask-fab-h, 48px) - var(--float-gap) - 0.75rem); }
  .to-top { right: 0.75rem; bottom: calc(var(--float-bottom) + var(--ask-fab-h, 48px) + var(--float-gap)); width: 46px; height: 46px; }
  .site-footer { padding-bottom: calc(var(--float-bottom) + 6.5rem); }
}
@media (prefers-reduced-motion: reduce) { .to-top, .to-top.is-visible { transition: none; transform: none; } }
@media print { .to-top { display: none; } }
