/* Cookie Consent — minimal */
.cookie-consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s ease;
}

.cookie-consent.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-consent__panel {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.85rem 1rem 1rem;
}

@media (min-width: 768px) {
  .cookie-consent__panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
  }
}

.cookie-consent__copy {
  min-width: 0;
}

.cookie-consent__title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #1d1d1f;
}

.cookie-consent__text {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #86868b;
}

.cookie-consent__text a {
  color: #2d5a50;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .cookie-consent__actions {
    margin-top: 0;
  }
}

.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: none;
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
  background: transparent;
  color: #1d1d1f;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.cookie-consent__btn--primary {
  background: #1a3a34;
  color: #fff;
  padding-inline: 0.9rem;
}

.cookie-consent__btn--primary:hover {
  background: #142e29;
}

.cookie-consent__btn--ghost {
  color: #6e6e73;
  padding-inline: 0.5rem;
}

.cookie-consent__btn--ghost:hover {
  color: #1d1d1f;
}

.cookie-consent__btn:focus-visible {
  outline: 2px solid #2d5a50;
  outline-offset: 2px;
}

/* Modal */
.cookie-consent-modal {
  width: min(100% - 1.5rem, 24rem);
  max-height: calc(100vh - 1.5rem);
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
}

.cookie-consent-modal::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.cookie-consent-modal__panel {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.875rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

.cookie-consent-modal__title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #1d1d1f;
}

.cookie-consent-modal__close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #86868b;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

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

.cookie-consent-categories {
  margin-top: 0.85rem;
  border-top: 1px solid #ececee;
}

.cookie-consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #ececee;
}

.cookie-consent-category__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1d1d1f;
}

.cookie-consent-category__desc {
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: #86868b;
}

.cookie-consent-toggle {
  position: relative;
  flex-shrink: 0;
  width: 2.25rem;
  height: 1.375rem;
}

.cookie-consent-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cookie-consent-toggle input:disabled {
  cursor: not-allowed;
}

.cookie-consent-toggle__track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: #d2d2d7;
  transition: background 0.2s ease;
}

.cookie-consent-toggle__track::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__track,
.cookie-consent-toggle input:disabled + .cookie-consent-toggle__track {
  background: #2d5a50;
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__track::after,
.cookie-consent-toggle input:disabled + .cookie-consent-toggle__track::after {
  transform: translateX(0.875rem);
}

.cookie-consent-toggle input:disabled + .cookie-consent-toggle__track {
  opacity: 0.65;
}

.cookie-consent-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.cookie-settings-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
  text-decoration: none;
}

.cookie-settings-link:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent,
  .cookie-consent-toggle__track,
  .cookie-consent-toggle__track::after {
    transition: none !important;
  }
}
