/* GDPR-strict cookie consent — banner + preferences modal.
   Uses Tilda's Montserrat/Inter for visual consistency. */

#gdpr-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  padding: 20px 24px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  display: none;
}
#gdpr-banner.show { display: block; }
#gdpr-banner__text { margin: 0 0 16px; }
#gdpr-banner__text a { color: #0066cc; text-decoration: underline; }
#gdpr-banner__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
#gdpr-banner button {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid #999;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}
#gdpr-banner button:hover { background: #f5f5f5; border-color: #333; }
#gdpr-banner button#gdpr-accept-all {
  background: #1F4E79; color: #fff; border-color: #1F4E79;
}
#gdpr-banner button#gdpr-accept-all:hover { background: #163a5c; }

/* Preferences modal */
#gdpr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Inter', Arial, sans-serif;
}
#gdpr-modal.show { display: flex; }
#gdpr-modal__panel {
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  color: #333;
}
#gdpr-modal__panel h2 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 16px;
  color: #1F4E79;
}
#gdpr-modal__panel p { font-size: 14px; line-height: 1.6; margin: 0 0 16px; color: #555; }
.gdpr-category {
  border-top: 1px solid #eee;
  padding: 16px 0;
}
.gdpr-category__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.gdpr-category h3 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  color: #333;
}
.gdpr-category p { font-size: 13px; margin: 8px 0 0; }
.gdpr-toggle {
  position: relative;
  width: 42px; height: 22px;
  background: #ccc;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.gdpr-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.gdpr-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.gdpr-toggle.on { background: #1F4E79; }
.gdpr-toggle.on::after { transform: translateX(20px); }
.gdpr-toggle.disabled { background: #1F4E79; opacity: 0.5; cursor: not-allowed; }
#gdpr-modal__actions {
  display: flex; gap: 8px; margin-top: 24px; justify-content: flex-end; flex-wrap: wrap;
}
#gdpr-modal button {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600; font-size: 13px;
  padding: 10px 20px; border-radius: 4px;
  border: 1px solid #999; background: #fff; color: #333;
  cursor: pointer; transition: all 0.2s ease;
}
#gdpr-modal button:hover { background: #f5f5f5; border-color: #333; }
#gdpr-modal button#gdpr-save-prefs {
  background: #1F4E79; color: #fff; border-color: #1F4E79;
}

/* Manage preferences link (usually in footer) */
.gdpr-manage-link {
  color: #666; text-decoration: underline;
  cursor: pointer; background: none; border: none;
  font-family: 'Inter', Arial, sans-serif; font-size: 13px; padding: 0;
}
.gdpr-manage-link:hover { color: #333; }

@media (max-width: 600px) {
  #gdpr-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
  #gdpr-banner__buttons { flex-direction: column; }
  #gdpr-banner__buttons button { width: 100%; }
  #gdpr-modal__panel { padding: 20px; }
}
