/* ============================================================
   БАНЕРЪТ ЗА БИСКВИТКИ — partials/saglasie-banner.php, 15.11.2026
   ============================================================
   Представка `sag-`. Зарежда се на всяка страница (head.php и vacation.php).

   ⚠️ z-index 1050: над менюто (1000), долната лента на телефон (950) и
   плаващите кръгчета (900); ПОД изскачащите прозорци — съоръжението (1100)
   и брънча (3000). Отвори ли се прозорец, той застава отгоре; банерът
   остава отдолу и се вижда, щом прозорецът се затвори.
   ============================================================ */

.sag {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1050;
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px 22px 16px;
  border-radius: 20px;
  background-color: #fff;
  border: 1px solid #eadfd3;
  box-shadow: 0 16px 40px rgba(49, 47, 48, 0.18);
  color: #312f30;
  font-family: 'Nunito Sans', sans-serif;
}

.sag[hidden] {
  display: none;
}

.sag-zaglavie {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.sag-tekst {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.sag-vrazka {
  color: #12667f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sag-nastroiki {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background-color: #f5f0ea;
}

.sag-nastroiki[hidden] {
  display: none;
}

.sag-izbor {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}

.sag-izbor strong {
  font-weight: 800;
}

.sag-izbor input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #a55618;
}

.sag-izbor input:disabled {
  cursor: default;
}

/* Двата бутона — ЕДНАКВО големи. Виж бележката в partials/saglasie-banner.php. */
.sag-butoni {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.sag-buton {
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid #312f30;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  cursor: pointer;
}

.sag-buton-da,
.sag-buton-zapazi {
  background-color: #e5bb4c;
  border-color: #e5bb4c;
}

.sag-buton-da:hover,
.sag-buton-zapazi:hover {
  background-color: #dfaa20;
  border-color: #dfaa20;
}

.sag-buton-ne {
  background-color: #fff;
}

.sag-buton-ne:hover {
  background-color: #f5f0ea;
}

.sag-buton[hidden] {
  display: none;
}

.sag-buton:focus-visible,
.sag-link:focus-visible,
.sag-izbor input:focus-visible {
  outline: 3px solid #e58f4c;
  outline-offset: 2px;
}

.sag-dolu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.sag-link {
  padding: 8px 2px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: #343233;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Бутонът „Бисквитки" във футъра — да изглежда като съседните връзки. */
.footer-link-buton {
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}

@media (max-width: 600px) {
  /* С „Бисквитки" връзките във футъра стават три — на телефон се пренасят
     цели, вместо да се чупят по средата. */
  .footer-links-left {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .footer-links-left .footer-link {
    white-space: nowrap;
  }

  .sag {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: calc(100vh - 20px);
    padding: 18px 16px 12px;
  }

  .sag-tekst {
    font-size: 14px;
  }

  /* Долната лента (Обади се · Маршрут · Viber) се показва при скрол — банерът
     се качва над нея, за да не я покрива. 74px = лентата (~63px) + отстъп. */
  body:has(.sticky-cta-visible) .sag {
    bottom: 74px;
    max-height: calc(100vh - 84px);
  }
}
