/* ─── APPLICATION DIALOG (Google Form embed) ─── */
html.app-dialog-open { overflow: hidden; }
.app-dialog {
  width: min(760px, calc(100vw - 2rem));
  height: min(88vh, 960px);
  margin: auto; padding: 0; border: none;
  border-radius: 20px; overflow: hidden;
  background: #fff; color: #0f172a;
  box-shadow:
    0 40px 100px rgba(15,23,42,.45),
    0 12px 32px rgba(30,58,138,.25),
    0 0 0 1px rgba(59,130,246,.15);
  font-family: 'Montserrat', sans-serif;
}
.app-dialog[open] { display: flex; flex-direction: column; animation: appDialogIn .45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.app-dialog::backdrop {
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(30,64,175,.35), transparent 70%),
    rgba(10,20,40,.72);
  backdrop-filter: blur(6px);
  animation: appBackdropIn .3s ease;
}
@keyframes appDialogIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes appBackdropIn { from { opacity: 0; } to { opacity: 1; } }

.app-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 70%, #1e40af 100%);
  color: #fff;
}
.app-dialog-eyebrow {
  display: block; font-size: .68rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: #93c5fd; margin-bottom: .25rem;
}
.app-dialog-head h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.app-dialog-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.app-dialog-newtab {
  font-size: .75rem; font-weight: 600; color: #dbeafe;
  padding: .5rem .75rem; border-radius: 8px;
  transition: background .2s ease, transform .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-dialog-newtab:hover { background: rgba(255,255,255,.1); }
.app-dialog-newtab:active { transform: scale(.96); }
.app-dialog-close {
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06);
  color: #fff; font-size: 1rem; line-height: 1;
  transition: background .2s ease, transform .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-dialog-close:hover { background: rgba(255,255,255,.16); transform: rotate(90deg); }
.app-dialog-close:active { transform: rotate(90deg) scale(.9); }
.app-dialog-newtab:focus-visible,
.app-dialog-close:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

.app-dialog-body { position: relative; flex: 1; background: #f1f5fb; }
.app-dialog-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .3s ease; }
.app-dialog.is-loaded iframe { opacity: 1; }
.app-dialog-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: .85rem; font-weight: 600; color: #475569;
}
.app-dialog.is-loaded .app-dialog-loading { opacity: 0; }

@media (max-width: 560px) {
  .app-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
  .app-dialog-head { padding: 1rem 1.25rem; }
  .app-dialog-newtab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-dialog[open], .app-dialog::backdrop { animation: none; }
}
