/* Cookie controls use their own stylesheet so an older app.css cannot leave
   the banner as unstyled text under the footer. */
.privacy-controls {
  position: fixed;
  z-index: 100;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.privacy-controls .language-control {
  position: static;
  max-width: 150px;
  pointer-events: auto;
}

.privacy-controls .language-control select {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #dbe6d5;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgb(25 53 38 / 8%);
}

.privacy-controls .cookie-banner {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 960px;
  min-width: 0;
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  margin: 0 auto;
  padding: 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #233c32;
  background: #fff;
  border: 1px solid #dbe6d5;
  border-top: 3px solid #237557;
  border-radius: 16px;
  box-shadow: 0 12px 42px rgb(25 53 38 / 18%);
  pointer-events: auto;
}

.privacy-controls .cookie-banner[hidden] {
  display: none !important;
}

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

.cookie-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #233c32;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.2px;
}

.cookie-symbol {
  flex: none;
  font-size: 21px;
  line-height: 1;
}

.cookie-description {
  margin: 0;
  color: #526b5b;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cookie-description a {
  color: #237557;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 0 0 300px;
  gap: 10px;
}

.cookie-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  border-radius: 10px;
}

.cookie-actions .button.secondary {
  color: #173f35;
  background: #f5f8f2;
  border-color: #cddcc5;
  box-shadow: none;
}

.cookie-actions .button.secondary:hover {
  background: #eaf1e2;
}

.cookie-actions .button.primary {
  color: #fff;
  background: #237557;
  border-color: #237557;
  box-shadow: none;
}

.cookie-actions .button.primary:hover {
  background: #1a6248;
  border-color: #1a6248;
}

@media (max-width: 760px) {
  .privacy-controls {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
  }

  .privacy-controls .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    max-width: 520px;
    padding: 16px;
  }

  .cookie-actions {
    flex: 0 0 auto;
    width: 100%;
    gap: 8px;
  }

  .cookie-actions .button {
    padding: 10px 8px;
  }
}

@media (max-height: 420px) {
  .privacy-controls .cookie-banner {
    gap: 10px;
    padding: 12px 16px;
  }
}

@media print {
  .privacy-controls {
    display: none !important;
  }
}
