/* Roadmap Gate — modal that captures 5 fields before emailing the PDF.
   Inherits AWA brand tokens from the host page: --teal, --teal-dark, --teal-light,
   --teal-bg, --text, --text-secondary, --text-muted, --border, --gold, --gold-dark,
   --bg, --bg-alt. No brand values hardcoded. */

.rg-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: inherit;
  color: var(--text, #1a1a1a);
}
.rg-modal[data-open="true"] { display: flex; }

.rg-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.58);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.rg-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg, #fafaf8);
  border: 1px solid var(--border, #e0ddd8);
  border-radius: 12px;
  padding: 32px 32px 28px;
  box-shadow: 0 24px 60px rgba(26, 26, 26, 0.22);
  animation: rg-in 180ms ease-out;
}
@keyframes rg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.rg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted, #6b6b6b);
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}
.rg-close:hover {
  background: var(--bg-alt, #f2f0ed);
  color: var(--text, #1a1a1a);
}

.rg-state { display: none; }
.rg-state[data-active="true"] { display: block; }

.rg-dialog h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text, #1a1a1a);
  font-weight: 700;
}
.rg-dialog p.rg-lead {
  margin: 0 0 20px;
  color: var(--text-secondary, #555555);
  font-size: 15px;
  line-height: 1.5;
}

.rg-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
}
.rg-form input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e0ddd8);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text, #1a1a1a);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 120ms, box-shadow 120ms;
}
.rg-form input:focus {
  outline: none;
  border-color: var(--teal, #4D9096);
  box-shadow: 0 0 0 3px var(--teal-bg, rgba(77, 144, 150, 0.18));
}
.rg-form input:invalid:not(:placeholder-shown) {
  border-color: var(--gold-dark, #9e7040);
}
.rg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

.rg-submit {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--teal, #4D9096);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms;
}
.rg-submit:hover:not(:disabled) { background: var(--teal-dark, #3D7A7F); }
.rg-submit:disabled { opacity: 0.6; cursor: wait; }

.rg-privacy {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-muted, #6b6b6b);
  line-height: 1.45;
  text-align: center;
}

.rg-state[data-state="success"] h2,
.rg-state[data-state="error"]   h2 {
  margin-top: 0;
  text-align: center;
}
.rg-icon {
  display: block;
  margin: 0 auto 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  line-height: 48px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  font-family: inherit;
}
.rg-state[data-state="success"] .rg-icon { background: var(--teal, #4D9096); }
.rg-state[data-state="error"]   .rg-icon { background: var(--gold-dark, #9e7040); }
.rg-state[data-state="success"] p,
.rg-state[data-state="error"]   p {
  color: var(--text-secondary, #555555);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
.rg-state[data-state="error"] p a {
  color: var(--teal-dark, #3D7A7F);
  font-weight: 600;
}
