/* ========== AUDIT POPUP ========== */

:root {
  --popup-cream: #fbf8f4;
  --popup-ink: #1a0f08;
  --popup-ink-light: #6b5848;
  --popup-terracotta: #e8a87c;
  --popup-terracotta-dark: #c67b4f;
  --popup-border: #e5ddd0;
}

#auditPopup {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: auto;
  max-height: 90vh;
  border: none;
  border-radius: 20px 20px 0 0;
  padding: 0;
  box-shadow: -10px -10px 40px rgba(0, 0, 0, 0.25);
  background: var(--popup-cream);
  overflow: auto;
  margin: 0;
  animation: slideUpPopup 0.3s ease-out;
}

#auditPopup::backdrop {
  background: rgba(0, 0, 0, 0);
  animation: fadeInBackdrop 0.3s ease-out;
}

@keyframes slideUpPopup {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInBackdrop {
  from {
    background: rgba(0, 0, 0, 0);
  }
  to {
    background: rgba(0, 0, 0, 0.4);
  }
}

/* Popup container */
.audit-popup-content {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Close button */
#auditPopupClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--popup-ink-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 1;
}

#auditPopupClose:hover {
  color: var(--popup-ink);
}

/* Popup heading */
.audit-popup-heading {
  font-family: 'Instrument Serif', serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--popup-ink);
  line-height: 1.2;
  margin-top: 8px;
  padding-right: 36px;
}

.audit-popup-subheading {
  font-size: 0.9rem;
  color: var(--popup-ink-light);
  line-height: 1.5;
}

/* Form styling */
#auditPopupForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audit-popup-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audit-popup-form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--popup-ink);
  letter-spacing: 0.3px;
}

.audit-popup-form-input,
.audit-popup-form-select {
  padding: 10px 12px;
  border: 1px solid var(--popup-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--popup-ink);
  background: var(--popup-cream);
  transition: all 0.2s;
}

.audit-popup-form-input:focus,
.audit-popup-form-select:focus {
  outline: none;
  border-color: var(--popup-terracotta);
  box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.1);
}

.audit-popup-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b5848' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.audit-popup-form-input::placeholder {
  color: var(--popup-ink-light);
}

/* Submit button */
.audit-popup-submit {
  padding: 12px 20px;
  background: var(--popup-terracotta);
  color: var(--popup-ink);
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 8px;
}

.audit-popup-submit:hover {
  background: var(--popup-terracotta-dark);
  transform: translateY(-1px);
}

.audit-popup-submit:disabled {
  background: var(--popup-ink-light);
  opacity: 0.6;
  cursor: not-allowed;
}

/* Trust signal */
.audit-popup-trust {
  font-size: 0.75rem;
  color: var(--popup-ink-light);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.audit-popup-trust svg {
  width: 14px;
  height: 14px;
  color: var(--popup-terracotta);
}

/* Responsive */
@media (max-width: 768px) {
  #auditPopup {
    max-width: 100%;
    max-height: 85vh;
  }

  .audit-popup-content {
    padding: 24px 20px;
  }

  .audit-popup-heading {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .audit-popup-content {
    padding: 20px 16px;
  }

  .audit-popup-heading {
    font-size: 1.1rem;
    padding-right: 32px;
  }
}
