/**
 * Zenith Privacy Preferences Styles
 * Matches site design: Plain fonts, dark (#00273f), lemony (#e6ff6a)
 */

/* Banner */
.prefs-dialog {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 39, 63, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  padding: 20px 24px;
  box-shadow: 0 -4px 24px rgba(0, 39, 63, 0.25);
  z-index: 10000;
  transform: translateY(100%);
  transition:
    transform 0.3s ease-in-out,
    opacity 0.3s ease-in-out;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  visibility: hidden;
  opacity: 0;
  font-family:
    var(--font-plain-regular),
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.prefs-dialog.show {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}

.prefs-dialog-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.prefs-dialog-text h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.5px;
}

.prefs-dialog-text p {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
}

.prefs-dialog-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Buttons */
.prefs-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.prefs-btn-accept {
  background: #e6ff6a;
  color: #00273f;
  border: 1px solid rgba(230, 255, 106, 0.4);
}

.prefs-btn-accept:hover {
  background: #eeff8a;
  transform: translateY(-1px);
}

.prefs-btn-reject {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.prefs-btn-reject:hover {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.prefs-btn-settings {
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.prefs-btn-settings:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Settings Modal */
.prefs-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-family:
    var(--font-plain-regular),
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.prefs-settings-modal.show {
  opacity: 1;
  visibility: visible;
}

.prefs-settings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 39, 63, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.prefs-settings-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 39, 63, 0.25);
  border: 1px solid #efefef;
}

.prefs-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #efefef;
}

.prefs-settings-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #00273f;
  letter-spacing: -1px;
}

.prefs-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #a0abb1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.prefs-close:hover {
  background: #f3f3f3;
  color: #00273f;
}

.prefs-settings-body {
  padding: 20px 24px;
  max-height: 400px;
  overflow-y: auto;
}

.prefs-settings-body > p {
  color: #696969;
  margin: 0 0 20px 0;
  font-size: 14px;
  line-height: 22px;
}

/* Categories */
.prefs-category {
  margin-bottom: 16px;
  border: 1px solid #efefef;
  border-radius: 8px;
  overflow: hidden;
}

.prefs-category-header {
  padding: 14px 16px;
  background: #f3f3f3;
  border-bottom: 1px solid #efefef;
}

.prefs-category-description {
  padding: 14px 16px;
}

.prefs-category-description p {
  margin: 0 0 10px 0;
  color: #696969;
  font-size: 14px;
  line-height: 22px;
}

.prefs-details {
  background: #f3f3f3;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #696969;
  margin: 8px 0;
  line-height: 20px;
}

.prefs-details strong {
  color: #00273f;
  font-weight: 600;
}

.prefs-details em {
  color: #a0abb1;
}

/* Toggle Switch */
.prefs-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 12px;
}

.prefs-toggle input[type="checkbox"] {
  display: none;
}

.prefs-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: #a0abb1;
  border-radius: 24px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.prefs-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 39, 63, 0.2);
}

.prefs-toggle input:checked + .prefs-slider {
  background: #00273f;
}

.prefs-toggle input:checked + .prefs-slider::before {
  transform: translateX(20px) translateY(-50%);
}

.prefs-toggle input:disabled + .prefs-slider {
  background: #00273f;
  opacity: 0.5;
  cursor: not-allowed;
}

.prefs-toggle strong {
  color: #00273f;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* Settings Footer */
.prefs-settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #efefef;
  background: white;
}

.prefs-settings-footer .prefs-btn-reject {
  background: white;
  color: #696969;
  border: 1px solid #efefef;
}

.prefs-settings-footer .prefs-btn-reject:hover {
  background: #f3f3f3;
  color: #00273f;
}

.prefs-settings-footer .prefs-btn-accept {
  background: #00273f;
  color: white;
  border: 1px solid #00273f;
}

.prefs-settings-footer .prefs-btn-accept:hover {
  background: #003a5c;
}

/* Mobile */
@media (max-width: 768px) {
  .prefs-dialog {
    padding: 16px;
  }

  .prefs-dialog-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .prefs-dialog-text p {
    max-width: none;
  }

  .prefs-dialog-actions {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .prefs-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .prefs-settings-content {
    width: 95%;
    max-height: 95vh;
  }

  .prefs-settings-footer {
    flex-direction: column;
  }

  .prefs-settings-footer .prefs-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .prefs-dialog-actions {
    gap: 8px;
  }

  .prefs-btn {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .prefs-dialog,
  .prefs-settings-modal,
  .prefs-btn,
  .prefs-slider,
  .prefs-slider::before {
    transition: none;
  }
}
