/* ─── BUTTONS ─── */

/* Spinner inside btn-primary */
.btn-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form success state */
.audit-form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 2.5rem 0;
}

.audit-success-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-family: 'DM Mono', monospace;
}

.audit-success-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.audit-success-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.btn-primary:hover::before { transform: translateX(0); }
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(212,92,58,0.3);
  background: var(--accent-hover);
}

.btn-primary.large {
  width: 100%;
  justify-content: center;
  padding: 1.1rem 2rem;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.btn-ghost {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: all 0.2s;
}

.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

/* ─── TAGS ─── */
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
}

.tag.neg { border-color: rgba(192,57,43,0.3);  color: rgba(192,57,43,0.75); }
.tag.pos { border-color: rgba(74,124,111,0.35); color: rgba(74,124,111,0.9); }

/* ─── FORMS ─── */
.form-field { margin-bottom: 1rem; }

.form-field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.9rem 1.25rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-field input::placeholder { color: var(--text-muted); }
.form-field input:focus { border-color: rgba(212,92,58,0.45); }

.form-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

/* ─── CONSENT CHECKBOX ─── */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  cursor: pointer;
}

.form-consent input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.form-consent-box {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  border: 1px solid var(--border-accent);
  background: var(--bg);
  transition: all 0.18s ease;
  position: relative;
}

.form-consent input[type="checkbox"]:checked + .form-consent-box {
  background: var(--accent);
  border-color: var(--accent);
}

.form-consent input[type="checkbox"]:checked + .form-consent-box::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
  width: 0.3rem;
  height: 0.55rem;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
}

.form-consent-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.7;
}

.consent-link {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(212,92,58,0.4);
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s;
}

.consent-link:hover { border-color: var(--accent); }

.consent-error .form-consent-box {
  border-color: rgba(192,57,43,0.7);
  box-shadow: 0 0 0 2px rgba(192,57,43,0.12);
}

/* ─── PRIVACY MODAL ─── */
.privacy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.privacy-modal.open { display: flex; }

.privacy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.privacy-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-2);
  border: 1px solid var(--border-accent);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.privacy-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  transition: color 0.2s;
  line-height: 1;
}

.privacy-modal-close:hover { color: var(--text); }

.privacy-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border-accent) transparent;
}

.privacy-modal-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

.privacy-modal-body h2:first-child { margin-top: 0; }

.privacy-modal-body h3 {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.privacy-modal-body p {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 0.75rem;
}

.privacy-modal-body ul {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.privacy-modal-body li {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.8;
}

.privacy-modal-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,92,58,0.3);
  transition: border-color 0.2s;
}

.privacy-modal-body a:hover { border-color: var(--accent); }

.privacy-modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
