/* Cookie consent — adapted for Очки.бел */

.rp-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

.rp-cookie-btn:hover { transform: translateY(-1px); }

.rp-cookie-btn--primary {
  background: #308fad;
  color: #fff;
  box-shadow: 0 8px 24px rgba(48, 143, 173, 0.28);
}

.rp-cookie-btn--primary:hover {
  background: #1e667e;
  box-shadow: 0 10px 28px rgba(30, 102, 126, 0.32);
}

.rp-cookie-btn--outline {
  background: rgba(255, 255, 255, 0.85);
  color: #1a2b4a;
  border: 1px solid rgba(26, 43, 74, 0.14);
}

.rp-cookie-btn--ghost {
  background: transparent;
  color: #5a6678;
  box-shadow: none;
}

.rp-cookie-btn--sm {
  padding: 10px 22px;
  font-size: 0.88rem;
}

.rp-cookie[hidden] { display: none; }

.rp-cookie {
  position: fixed;
  inset: auto 0 0;
  z-index: 400;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(48, 143, 173, 0.18);
  box-shadow: 0 -12px 40px rgba(11, 11, 13, 0.1);
  backdrop-filter: blur(14px);
}

.rp-cookie__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rp-cookie__title {
  margin: 0 0 6px;
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 1rem;
  font-weight: 700;
  color: #1a2b4a;
}

.rp-cookie__text {
  margin: 0;
  max-width: 760px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #5a6678;
}

.rp-cookie__text a {
  color: #1e667e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rp-cookie__text a:hover { color: #308fad; }

.rp-cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.rp-cookie-settings[hidden] { display: none; }

.rp-cookie-settings {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rp-cookie-settings__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: blur(6px);
}

.rp-cookie-settings__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(11, 11, 13, 0.18);
}

.rp-cookie-settings__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: #eee8e2;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: #5a6678;
  cursor: pointer;
}

.rp-cookie-settings__title {
  margin: 0 0 10px;
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2b4a;
}

.rp-cookie-settings__intro {
  margin: 0 0 20px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #5a6678;
}

.rp-cookie-settings__list {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.rp-cookie-settings__item {
  padding: 16px 18px;
  border: 1px solid rgba(48, 143, 173, 0.14);
  border-radius: 14px;
  background: #fbfcfd;
}

.rp-cookie-settings__item--locked {
  background: #eee8e2;
}

.rp-cookie-settings__item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.rp-cookie-settings__item h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #1a2b4a;
}

.rp-cookie-settings__item p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #5a6678;
}

.rp-cookie-settings__toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.rp-cookie-settings__toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rp-cookie-settings__toggle-ui {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #c8c0b8;
  transition: background 0.2s ease;
  position: relative;
}

.rp-cookie-settings__toggle-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(11, 11, 13, 0.15);
  transition: transform 0.2s ease;
}

.rp-cookie-settings__toggle input:checked + .rp-cookie-settings__toggle-ui {
  background: #308fad;
}

.rp-cookie-settings__toggle input:checked + .rp-cookie-settings__toggle-ui::after {
  transform: translateX(20px);
}

.rp-cookie-settings__toggle input:disabled + .rp-cookie-settings__toggle-ui {
  opacity: 0.72;
  cursor: not-allowed;
}

.rp-cookie-settings__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rp-cookie-settings__policy {
  font-size: 0.88rem;
  color: #1e667e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rp-cookie-settings__actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.footer-legal__cookie {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal__cookie:hover {
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .rp-cookie__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .rp-cookie__actions {
    justify-content: stretch;
  }

  .rp-cookie__actions .rp-cookie-btn {
    flex: 1 1 calc(50% - 5px);
  }

  .rp-cookie__actions .rp-cookie-btn[data-rp-cookie-open-settings] {
    flex-basis: 100%;
  }
}

@media (max-width: 520px) {
  .rp-cookie__actions .rp-cookie-btn {
    flex-basis: 100%;
  }

  .rp-cookie-settings__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .rp-cookie-settings__actions {
    width: 100%;
    margin-left: 0;
  }

  .rp-cookie-settings__actions .rp-cookie-btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rp-cookie-btn,
  .rp-cookie-settings__toggle-ui,
  .rp-cookie-settings__toggle-ui::after {
    transition: none;
  }
}
