/* Feedback + Contact dialogs (public/js/replexForms.js). Shared by the
   landing page and the editor, so it carries its own tokens matching both. */
.rx-dialog {
  --rx-bg: #17181b;
  --rx-field: #1e1f23;
  --rx-line: #2c2d33;
  --rx-line-strong: #3d3e45;
  --rx-text: #ececee;
  --rx-text-2: #a2a2aa;
  --rx-text-3: #6d6d76;
  --rx-accent: #ff5a3c;
  --rx-accent-ink: #1d0b05;
  --rx-ok: #7fd4c1;
  --rx-star: #ffb547;
  --rx-focus: #7fd4c1;

  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--rx-line-strong);
  border-radius: 14px;
  background: var(--rx-bg);
  color: var(--rx-text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  overflow: auto;
}
.rx-dialog[open] { animation: rx-in 0.18s ease-out; }
.rx-dialog::backdrop { background: rgba(5, 5, 7, 0.68); }
@keyframes rx-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
@media (prefers-reduced-motion: reduce) { .rx-dialog[open] { animation: none; } }

.rx-dialog *, .rx-dialog *::before, .rx-dialog *::after { box-sizing: border-box; }
.rx-dialog :focus-visible { outline: 2px solid var(--rx-focus); outline-offset: 2px; }

.rx-form { display: flex; flex-direction: column; gap: 18px; padding: 22px 22px 18px; }
.rx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rx-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.rx-intro { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--rx-text-2); }
.rx-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--rx-text-2);
  cursor: pointer;
}
.rx-close:hover { background: var(--rx-field); color: var(--rx-text); }
.rx-close svg { width: 16px; height: 16px; }

/* Fields */
.rx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .rx-grid { grid-template-columns: 1fr; } }
.rx-field { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.rx-field > span { font-size: 12.5px; font-weight: 500; color: var(--rx-text); }
.rx-field em { font-style: normal; font-weight: 400; color: var(--rx-text-3); margin-left: 4px; }
.rx-field input, .rx-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--rx-line);
  border-radius: 8px;
  background: var(--rx-field);
  color: var(--rx-text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rx-field textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.rx-field input::placeholder, .rx-field textarea::placeholder { color: var(--rx-text-3); }
.rx-field input:hover, .rx-field textarea:hover { border-color: var(--rx-line-strong); }
.rx-field input:focus, .rx-field textarea:focus {
  outline: none;
  border-color: var(--rx-text-3);
  box-shadow: 0 0 0 3px rgba(127, 212, 193, 0.16);
}
.rx-field [aria-invalid="true"] { border-color: rgba(255, 90, 60, 0.7); }

/* Star rating: inputs come 5→1 in the DOM with row-reverse, so "this star
   and every star before it" is just `label ~ label`. */
.rx-rating { margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rx-rating legend { float: left; width: 100%; padding: 0; margin-bottom: 8px; font-size: 12.5px; font-weight: 500; }
.rx-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rx-stars label { display: inline-flex; padding: 2px; border-radius: 6px; cursor: pointer; }
.rx-stars svg { width: 30px; height: 30px; fill: var(--rx-line-strong); transition: fill 0.12s ease, transform 0.12s ease; }
.rx-stars input:checked ~ label svg { fill: var(--rx-star); }
.rx-stars:hover input:checked ~ label svg { fill: var(--rx-line-strong); }
.rx-stars:hover label:hover svg,
.rx-stars:hover label:hover ~ label svg { fill: var(--rx-star); }
.rx-stars label:hover svg { transform: scale(1.08); }
.rx-stars input:focus-visible + label { outline: 2px solid var(--rx-focus); outline-offset: 1px; }
.rx-rating-word { font-size: 13px; color: var(--rx-text-2); min-width: 64px; }

.rx-error {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 90, 60, 0.35);
  border-radius: 8px;
  background: rgba(255, 90, 60, 0.08);
  color: #ffb6a6;
  font-size: 13px;
}

.rx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}
.rx-powered { font-size: 12px; color: var(--rx-text-3); }
.rx-powered strong { font-weight: 600; color: var(--rx-text-2); }

.rx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--rx-line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--rx-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.rx-btn:hover:not(:disabled) { background: var(--rx-field); }
.rx-btn-primary { border-color: transparent; background: var(--rx-accent); color: var(--rx-accent-ink); }
.rx-btn-primary:hover:not(:disabled) { background: #ff7055; }
.rx-btn:disabled { opacity: 0.6; cursor: default; }

.rx-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 28px 26px; }
.rx-done[hidden] { display: none; }
.rx-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: rgba(127, 212, 193, 0.14);
  color: var(--rx-ok);
}
.rx-done-icon svg { width: 22px; height: 22px; }
.rx-done h2 { margin: 0; font-size: 17px; font-weight: 650; }
.rx-done p { margin: 0 0 16px; font-size: 13.5px; color: var(--rx-text-2); }

.rx-form[hidden] { display: none; }
.rx-sr, .rx-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
