/* GDPR Settings - Privacy & Data controls in settings panel */

.gdpr-settings-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gdpr-settings-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 16px;
}

.gdpr-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.gdpr-action-row:last-child {
  border-bottom: none;
}

.gdpr-action-info {
  flex: 1;
}

.gdpr-action-label {
  font-size: 0.95rem;
  color: #d4d4e0;
  font-weight: 500;
}

.gdpr-action-desc {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
}

.gdpr-action-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(138, 100, 200, 0.3);
  background: rgba(138, 100, 200, 0.1);
  color: #b99adc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  margin-left: 12px;
}

.gdpr-action-btn:hover {
  background: rgba(138, 100, 200, 0.2);
  border-color: rgba(138, 100, 200, 0.5);
}

.gdpr-action-btn.danger {
  border-color: rgba(220, 50, 50, 0.3);
  background: rgba(220, 50, 50, 0.1);
  color: #e86060;
}

.gdpr-action-btn.danger:hover {
  background: rgba(220, 50, 50, 0.2);
  border-color: rgba(220, 50, 50, 0.5);
}

/* Marketing-attribution opt-in switch */
.gdpr-action-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin-left: 12px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.gdpr-action-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e6e6f0;
  transition: transform 0.2s;
}

.gdpr-action-toggle:checked {
  background: rgba(138, 100, 200, 0.55);
  border-color: rgba(138, 100, 200, 0.7);
}

.gdpr-action-toggle:checked::after {
  transform: translateX(18px);
}

.gdpr-action-toggle:focus-visible {
  outline: 2px solid #b99adc;
  outline-offset: 2px;
}

.gdpr-legal-links {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.gdpr-legal-links a {
  color: #8a64c8;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}

.gdpr-legal-links a:hover {
  color: #b99adc;
  text-decoration: underline;
}

/* Delete account confirmation modal */
.gdpr-delete-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10000;
  /* scroll a tall confirm modal instead of clipping Cancel/Delete off a short
     landscape phone (see the shared modal-scroll recipe). Identical on desktop. */
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: max(env(safe-area-inset-top, 0px), 16px) 16px max(env(safe-area-inset-bottom, 0px), 16px);
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gdpr-delete-overlay.visible {
  display: flex;
  opacity: 1;
}

.gdpr-delete-modal {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(220, 50, 50, 0.3);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 440px;
  width: 90%;
  margin: auto;
  text-align: center;
  color: #d4d4e0;
}

/* The Privacy & Data panel shares the overlay; the section inside carries its
   own title and rows, so the modal only neutralises the deletion colouring. */
.gdpr-privacy-modal {
  border-color: rgba(185, 154, 220, 0.35);
  text-align: left;
  max-width: 520px;
}

.gdpr-privacy-modal .gdpr-delete-actions {
  margin-top: 20px;
}

.gdpr-privacy-modal .gdpr-settings-section {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.gdpr-delete-modal h3 {
  color: #e86060;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.gdpr-delete-modal p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #aaa;
}

.gdpr-delete-modal ul {
  text-align: left;
  list-style: disc;
  padding-left: 20px;
  margin: 12px 0 20px;
  font-size: 0.85rem;
  color: #bbb;
}

.gdpr-delete-modal li {
  margin-bottom: 4px;
}

.gdpr-delete-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(220, 50, 50, 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.gdpr-delete-input:focus {
  border-color: rgba(220, 50, 50, 0.6);
}

.gdpr-delete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.gdpr-delete-actions button {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  font-weight: 600;
}

.gdpr-delete-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.gdpr-delete-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.gdpr-delete-confirm {
  background: rgba(220, 50, 50, 0.3);
  color: #e86060;
}

.gdpr-delete-confirm:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gdpr-delete-confirm:not(:disabled):hover {
  background: rgba(220, 50, 50, 0.5);
}
