/* =========================================================
   Routio cookie consent
   ========================================================= */

.routio-cookie-bar,
.routio-cookie-modal,
.routio-cookie-bar *,
.routio-cookie-modal * {
  box-sizing: border-box;
}

.routio-cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  font-family: inherit;
}

.routio-cookie-bar__inner {
  display: grid;
  gap: 14px;
  padding: 16px 16px 14px;
  border-radius: 28px;
  background: rgba(18, 18, 17, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  color: #f5f1ea;
  backdrop-filter: blur(14px);
}

.routio-cookie-bar__text strong {
  display: inline-flex;
  margin-bottom: 6px;
  color: #f5f1ea;
  font-size: 16px;
  font-weight: 900;
}

.routio-cookie-bar__text p {
  margin: 0;
  color: rgba(245, 241, 234, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.routio-cookie-bar__text a,
.routio-cookie-modal__head a {
  color: rgba(245, 241, 234, 0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.routio-cookie-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.routio-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 250, 242, 0.08);
  color: rgba(245, 241, 234, 0.92);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.routio-cookie-btn:hover {
  transform: translateY(-2px);
}

.routio-cookie-btn--primary {
  background: rgba(245, 241, 234, 0.96);
  color: #171513;
  border-color: rgba(245, 241, 234, 0.18);
}

.routio-cookie-btn--danger {
  border-color: rgba(245, 241, 234, 0.22);
}

.routio-cookie-btn.is-active {
  outline: 2px solid rgba(245, 241, 234, 0.45);
  outline-offset: 2px;
}

/* modal */
.routio-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: end center;
  font-family: inherit;
}

.routio-cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.routio-cookie-modal__panel {
  position: relative;
  width: min(720px, calc(100% - 24px));
  margin: 0 0 16px;
  border-radius: 28px;
  background: rgba(18, 18, 17, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  color: #f5f1ea;
  padding: 16px;
  backdrop-filter: blur(14px);
}

.routio-cookie-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(245, 241, 234, 0.9);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.routio-cookie-modal__head h3 {
  margin: 0 42px 8px 0;
  color: #f5f1ea;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.routio-cookie-modal__head p {
  margin: 0 0 12px;
  color: rgba(245, 241, 234, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.routio-cookie-modal__list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.routio-cookie-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.routio-cookie-item__text strong {
  display: inline-flex;
  margin-bottom: 4px;
  color: #f5f1ea;
  font-size: 15px;
  font-weight: 900;
}

.routio-cookie-item__text p {
  margin: 0;
  color: rgba(245, 241, 234, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.routio-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.routio-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.routio-toggle__ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.routio-toggle__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(245, 241, 234, 0.92);
  transition: transform 0.2s ease;
}

.routio-toggle input:checked + .routio-toggle__ui {
  background: rgba(245, 241, 234, 0.22);
  border-color: rgba(245, 241, 234, 0.38);
}

.routio-toggle input:checked + .routio-toggle__ui::after {
  transform: translateX(18px);
}

.routio-cookie-modal__footer {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 4px;
}

.routio-cookie-modal__footer .routio-cookie-btn {
  flex: 0 0 auto;
}

/* mobile */
@media (max-width: 680px) {
  .routio-cookie-bar {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .routio-cookie-bar__inner {
    padding: 14px;
    gap: 12px;
    border-radius: 24px;
  }

  .routio-cookie-bar__text strong {
    font-size: 18px;
  }

  .routio-cookie-bar__text p {
    font-size: 12px;
    line-height: 1.45;
  }

  .routio-cookie-bar__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .routio-cookie-bar__actions .routio-cookie-btn[data-cookie-action="settings"] {
    grid-column: 1 / -1;
  }

  .routio-cookie-btn {
    min-height: 42px;
    padding: 0 12px;
    font-size: 13px;
  }

  .routio-cookie-modal {
    place-items: center;
    padding: 10px;
  }

  .routio-cookie-modal__panel {
    width: 100%;
    margin: 0;
    padding: 14px;
    max-height: calc(100svh - 20px);
    overflow: auto;
    border-radius: 22px;
  }

  .routio-cookie-modal__head h3 {
    font-size: 18px;
  }

  .routio-cookie-modal__head p {
    font-size: 12px;
    line-height: 1.45;
  }

  .routio-cookie-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .routio-cookie-item__text strong {
    font-size: 15px;
  }

  .routio-cookie-item__text p {
    font-size: 12px;
    line-height: 1.45;
  }

  .routio-cookie-modal__footer {
    position: sticky;
    bottom: 0;
    background: rgba(18, 18, 17, 0.96);
    padding-top: 10px;
    margin-top: 12px;
  }
}