/* ==================================================
   COOKIE CONSENT
================================================== */

.cookie-consent {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 9999;

  max-width: 1100px;
  margin: 0 auto;

  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.cookie-consent[hidden],
.cookie-settings[hidden] {
  display: none;
}

.cookie-consent__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  padding: 24px 28px;
}

.cookie-consent__content {
  flex: 1;
}

.cookie-consent__content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.cookie-consent__content p {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cookie-consent__privacy-link {
  font-size: 0.9rem;
  text-decoration: underline;
}

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

.cookie-consent__secondary {
  background: transparent;
  border: 1px solid currentColor;
}

.cookie-consent__settings-button {
  padding: 8px 4px;

  border: 0;
  background: transparent;

  color: var(--color-primary);

  font: inherit;
  font-weight: 600;

  cursor: pointer;
}

.cookie-consent__settings-button:hover {
  text-decoration: underline;
}

/* ==================================================
   COOKIE SETTINGS
================================================== */

.cookie-settings {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.cookie-settings__overlay {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.55);
}

.cookie-settings__dialog {
  position: relative;

  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 40px);

  overflow-y: auto;

  background: #fff;
  border-radius: 12px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.cookie-settings__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 24px 28px;

  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cookie-settings__header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.cookie-settings__close {
  width: 40px;
  height: 40px;

  border: 0;
  background: transparent;

  font-size: 2rem;
  line-height: 1;

  cursor: pointer;

  color: var(--color-primary);
}

.cookie-settings__body {
  padding: 24px 28px;
}

.cookie-settings__body > p {
  margin-bottom: 24px;
}

/* ==================================================
   COOKIE CATEGORIES
================================================== */

.cookie-category {
  padding: 20px 0;

  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cookie-category:first-of-type {
  border-top: 0;
}

.cookie-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 25px;
}

.cookie-category h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.cookie-category p {
  margin: 0;

  font-size: 0.9rem;
  line-height: 1.55;
}

.cookie-category__status {
  flex-shrink: 0;

  font-size: 0.85rem;
  font-weight: 600;

  color: var(--color-primary);
}

/* ==================================================
   TOGGLE
================================================== */

.cookie-toggle {
  position: relative;

  display: inline-flex;

  width: 50px;
  height: 28px;

  flex-shrink: 0;

  cursor: pointer;
}

.cookie-toggle input {
  position: absolute;

  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__slider {
  position: absolute;
  inset: 0;

  background: #ccc;

  border-radius: 30px;

  transition: 0.2s;
}

.cookie-toggle__slider::before {
  content: "";

  position: absolute;

  width: 22px;
  height: 22px;

  left: 3px;
  top: 3px;

  background: #fff;

  border-radius: 50%;

  transition: 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--color-primary);
}

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

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

/* ==================================================
   SETTINGS FOOTER
================================================== */

.cookie-settings__footer {
  display: flex;
  justify-content: flex-end;

  padding: 20px 28px;

  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==================================================
   ACCESSIBILITY
================================================== */

.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;
}

/* ==================================================
   BODY
================================================== */

body.cookie-settings-open {
  overflow: hidden;
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 768px) {
  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;

    gap: 20px;

    padding: 20px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;

    width: 100%;
  }

  .cookie-consent__actions .btn {
    width: 100%;
  }

  .cookie-consent__settings-button {
    grid-column: 1 / -1;
  }

  .cookie-settings {
    padding: 10px;
  }

  .cookie-settings__dialog {
    max-height: calc(100vh - 20px);
  }

  .cookie-settings__header,
  .cookie-settings__body,
  .cookie-settings__footer {
    padding-left: 20px;
    padding-right: 20px;
  }

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

@media (max-width: 480px) {
  .cookie-consent__actions {
    grid-template-columns: 1fr;
  }

  .cookie-consent__settings-button {
    grid-column: auto;
  }
}

/* ==================================================
   GOOGLE MAP CONSENT
================================================== */

.map-consent-placeholder {
  min-height: 380px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 40px 20px;

  text-align: center;

  background: #f5f5f5;
}

.map-consent-placeholder > i {
  margin-bottom: 15px;

  font-size: 2.5rem;

  color: var(--color-primary);
}

.map-consent-placeholder h3 {
  margin-bottom: 10px;
}

.map-consent-placeholder p {
  max-width: 500px;
  margin-bottom: 20px;
}
