/* ==========================================================================
   Session I Commit 3, Feedback modal styles
   --------------------------------------------------------------------------
   All selectors namespaced .feedback-modal-*. Loaded via index.html
   alongside the rest of the design system. The modal overlay z-index uses
   the existing --z-backdrop / --z-modal token ladder.
   ========================================================================== */

.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal, 600);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.feedback-modal-overlay[hidden] {
  display: none !important;
}

.feedback-modal {
  position: relative;
  background: var(--bg2);
  border: 0.5px solid var(--bdr);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  font-family: var(--font-sans, system-ui, sans-serif);
  color: var(--tx);
}

.feedback-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--tx2);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 150ms ease, color 150ms ease;
}

.feedback-modal-close:hover,
.feedback-modal-close:focus-visible {
  background: var(--hover-bg);
  color: var(--tx);
  outline: none;
}

.feedback-modal-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--tx2);
  margin-bottom: 12px;
}

.feedback-modal-wave {
  width: 64px;
  height: 18px;
  color: var(--ac-strong);
  margin-bottom: 14px;
  display: block;
}

.feedback-modal-title {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--tx);
  margin: 0 0 8px;
}

.feedback-modal-subtitle {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 13px;
  line-height: 1.5;
  color: var(--tx1);
  margin: 0 0 20px;
}

.feedback-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Honeypot, visually offscreen but present in DOM. Bots typically fill
   anything they can see; real users can't focus this (tabindex=-1) or
   trigger autofill into it (autocomplete=off). */
.feedback-modal-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.feedback-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-modal-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--tx1);
}

.feedback-modal-label-optional {
  color: var(--tx2);
  font-weight: 400;
}

.feedback-modal-input,
.feedback-modal-textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--tx);
  background: var(--bg);
  border: 0.5px solid var(--bdr);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.feedback-modal-textarea {
  min-height: 96px;
  resize: vertical;
  font-family: var(--font-serif, Georgia, serif);
  line-height: 1.5;
}

.feedback-modal-input:focus,
.feedback-modal-textarea:focus {
  border-color: var(--ac);
  outline: none;
  box-shadow: 0 0 0 3px var(--ac-ring);
}

.feedback-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.feedback-modal-cancel,
.feedback-modal-submit {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}

.feedback-modal-cancel {
  background: transparent;
  border: 0.5px solid var(--bdr);
  color: var(--tx1);
}

.feedback-modal-cancel:hover,
.feedback-modal-cancel:focus-visible {
  background: var(--hover-bg);
  border-color: var(--bdr2);
  outline: none;
}

.feedback-modal-submit {
  background: var(--ac);
  border: 0.5px solid var(--ac);
  color: var(--ac-tx);
}

.feedback-modal-submit:hover:not(:disabled),
.feedback-modal-submit:focus-visible:not(:disabled) {
  background: var(--ac2);
  border-color: var(--ac2);
  outline: none;
}

.feedback-modal-submit:active:not(:disabled) {
  transform: scale(var(--active-scale, 0.97));
}

.feedback-modal-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.feedback-modal-status {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.45;
}

.feedback-modal-status[data-state="pending"] {
  background: var(--hover-bg);
  color: var(--tx1);
}

.feedback-modal-status[data-state="success"] {
  background: var(--gn-bg);
  color: var(--gn);
  border: 0.5px solid var(--gn-bdr);
}

.feedback-modal-status[data-state="error"] {
  background: var(--rd-bg);
  color: var(--rd);
  border: 0.5px solid var(--rd-bdr);
}

@media (max-width: 768px) {
  .feedback-modal-overlay {
    padding: 22px 16px;
  }
  .feedback-modal {
    padding: 24px;
  }
  .feedback-modal-title {
    font-size: 20px;
  }
}
