:root {
  color-scheme: light;
  font-family: Inter, Arial, sans-serif;
  background-color: #eef2f7;
  color: #172033;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(47, 128, 237, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  color: #172033;
}

.page-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 32px 20px 48px;
}

h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.05;
  color: #101828;
}

.panel {
  padding: 28px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(12px);
}

.panel-header {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

.intro {
  margin: 0;
  max-width: 48ch;
  font-size: 1rem;
  line-height: 1.6;
  color: #52607a;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #24324a;
}

input,
select,
button {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 14px;
}

input,
select {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

input::placeholder {
  color: #94a3b8;
}

input:hover,
select:hover {
  border-color: #94a3b8;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

input[type="date"] {
  min-height: 52px;
}

input[type="file"] {
  padding: 10px;
  border-style: dashed;
  background: #f8fafc;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
  cursor: pointer;
}

button {
  cursor: pointer;
  border: 0;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

button:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.26);
}

button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.16),
    0 12px 24px rgba(37, 99, 235, 0.22);
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.helper {
  min-height: 22px;
  padding: 0 2px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #52607a;
}

.field-note {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #64748b;
}

.phone-input {
  display: flex;
  gap: 10px;
}

#cellphoneCountryCode {
  width: 110px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 14px 10px;
}

.phone-number {
  position: relative;
}

.phone-number input,
.phone-country-select {
  min-height: 52px;
}

.phone-number input {
  padding-left: 132px;
}

.phone-country-trigger {
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 56px;
  height: 34px;
  padding: 0 10px;
  border-right: 1px solid #e2e8f0;
  transform: translateY(-50%);
  pointer-events: none;
}

.phone-flag {
  font-size: 1rem;
  line-height: 1;
}

.phone-chevron {
  font-size: 0.78rem;
  color: #64748b;
}

.phone-country-select {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 84px;
  border: 0;
  background: transparent;
  color: transparent;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  box-shadow: none;
}

.phone-country-select:focus {
  box-shadow: none;
}

.phone-prefix {
  position: absolute;
  top: 50%;
  left: 86px;
  z-index: 1;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.meta {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #334155;
}

.meta-row strong {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.meta-row span {
  min-width: 0;
  font-weight: 600;
  text-align: right;
  color: #0f172a;
}

dialog {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  padding: 24px;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

dialog p {
  margin: 0 0 16px;
  line-height: 1.5;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.waiver-overlay[hidden] {
  display: none;
}

.waiver-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.68);
}

.waiver-window {
  width: min(1080px, 100%);
  height: min(820px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 0;
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.30);
}

.waiver-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.waiver-toolbar p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.waiver-toolbar button {
  width: auto;
  min-width: 96px;
  padding-inline: 18px;
}

#waiverFrame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px 12px 24px;
  }

  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-row span {
    text-align: left;
  }

  .waiver-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .waiver-window {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .waiver-toolbar {
    padding: 10px 12px;
  }
}
