/* =========================================================
   SIMPLE COOKIE CONSENT
   Reusable on any website - no framework required
   ========================================================= */

.cookie-consent,
.cookie-modal,
.cookie-revisit,
.cookie-consent *,
.cookie-modal * {
  box-sizing: border-box;
}

.cookie-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 24px;
  background: #fff;
  color: #212121;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
  font-family: Arial, Helvetica, sans-serif;
}

.cookie-consent.is-hidden {
  display: none;
}

.cookie-consent__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cookie-consent__text {
  flex: 1 1 auto;
  min-width: 0;
}

.cookie-consent__text h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
}

.cookie-consent__text p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.65;
}

.cookie-consent__policy {
  color: #1863dc;
  font-size: 14px;
  text-decoration: underline;
}

.cookie-consent__actions,
.cookie-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-btn {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: opacity .2s ease, background .2s ease;
}

.cookie-btn:hover {
  opacity: .82;
}

.cookie-btn--primary {
  color: #fff;
  background: #1863dc;
  border-color: #1863dc;
}

.cookie-btn--secondary {
  color: #1863dc;
  background: #fff;
  border-color: #1863dc;
}

/* Reopen preferences */
.cookie-revisit {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 999990;
  display: none;
  padding: 10px 14px;
  border: 0;
  border-radius: 5px;
  background: #0056a7;
  color: #fff;
  font: 600 13px Arial, Helvetica, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .15);
}

.cookie-revisit.is-visible {
  display: block;
}

/* Modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  font-family: Arial, Helvetica, sans-serif;
}

.cookie-modal.is-open {
  display: block;
}

.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.cookie-modal__box {
  position: relative;
  width: calc(100% - 32px);
  max-width: 680px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 16px auto;
  padding: 28px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, .25);
}

.cookie-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #333;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cookie-modal__box h2 {
  margin: 0 45px 10px 0;
  font-size: 22px;
}

.cookie-modal__intro {
  margin: 0 0 20px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid #eee;
}

.cookie-category strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.cookie-category p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.cookie-status {
  flex-shrink: 0;
  color: #555;
  font-size: 12px;
  font-weight: 600;
}

/* Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 25px;
  flex-shrink: 0;
}

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

.cookie-switch span {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: #d0d5d2;
  cursor: pointer;
  transition: background .2s ease;
}

.cookie-switch span::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.cookie-switch input:checked + span {
  background: #1863dc;
}

.cookie-switch input:checked + span::before {
  transform: translateX(21px);
}

.cookie-modal__actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eee;
}

/* Mobile */
@media (max-width: 767px) {
  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 18px;
  }

  .cookie-consent__content {
    display: block;
  }

  .cookie-consent__actions {
    margin-top: 16px;
    justify-content: flex-start;
  }

  .cookie-btn {
    flex: 1 1 auto;
  }

  .cookie-modal__box {
    padding: 22px 18px;
  }

  .cookie-category {
    align-items: flex-start;
  }
}
