/* Cookie consent banner and settings modal */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  pointer-events: none;
}

.cookie-consent:not([hidden]) {
  pointer-events: auto;
}

.cookie-consent__bar {
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 1rem 0 1.25rem;
}

.cookie-consent__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.cookie-consent__text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #333;
}

.cookie-consent__text a {
  color: inherit;
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 1 auto;
}

.cookie-consent__btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
}

.cookie-consent__btn--primary {
  background: #5c6b2e;
  color: #fff;
  border-color: #5c6b2e;
}

.cookie-consent__btn--primary:hover {
  background: #4a5724;
}

.cookie-consent__btn--secondary {
  background: #fff;
  color: #333;
  border-color: rgba(0, 0, 0, 0.2);
}

.cookie-consent__btn--secondary:hover {
  background: #f5f5f5;
}

body.cookie-consent-visible #contacts {
  scroll-margin-bottom: 140px;
}

.cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-consent-modal[hidden] {
  display: none !important;
}

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

.cookie-consent-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem 1.75rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.cookie-consent-modal__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.cookie-consent-category {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cookie-consent-category:last-of-type {
  border-bottom: none;
}

.cookie-consent-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-consent-category__title {
  margin: 0;
  font-size: 1rem;
}

.cookie-consent-category__desc {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.45;
}

.cookie-consent-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-consent-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.2s;
}

.cookie-consent-toggle__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__slider {
  background: #5c6b2e;
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__slider::before {
  transform: translateX(20px);
}

.cookie-consent-toggle--disabled .cookie-consent-toggle__slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-consent-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cookie-consent-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0.25rem;
}

.cookie-consent-modal__close:hover {
  color: #000;
}

.site-footer-policy-link.js-cookie-settings {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: #f4f4f0;
  border-radius: 8px;
  min-height: 280px;
  height: 100%;
}

.consent-placeholder p {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 360px;
  color: #444;
}

.consent-placeholder__btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  border: 1px solid #5c6b2e;
  background: #5c6b2e;
  color: #fff;
  cursor: pointer;
}

.consent-placeholder__btn:hover {
  background: #4a5724;
}

.modal-rutube__consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  min-height: 200px;
  color: #fff;
}

.modal-rutube__consent-placeholder p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 400px;
}

@media (max-width: 767px) {
  .cookie-consent__actions {
    width: 100%;
  }

  .cookie-consent__btn {
    flex: 1 1 auto;
    min-width: calc(50% - 0.25rem);
  }
}
