/* ═══════════════════════════════════════════════════════════════
   Amelia Attendee Details – Modal Styles
   Clean, professional design that matches typical marathon/sports sites.
═══════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
#aad-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.28s ease;
}

#aad-modal-overlay.aad-visible {
  opacity: 1;
}

/* ── Modal box ── */
.aad-modal {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 820px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  margin: auto;
}

/* ── Header ── */
.aad-modal-header {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
  padding: 28px 32px 24px;
}

.aad-modal-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
}

.aad-subtitle {
  margin: 0;
  font-size: 14px;
  opacity: 0.88;
  color: #fff;
}

/* ── Attendee panels ── */
.aad-panels {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aad-panel {
  border: 2px solid #e8edf2;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.aad-panel:focus-within {
  border-color: #1a73e8;
}

.aad-panel-header {
  background: #f4f7fc;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #e8edf2;
}

.aad-panel-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aad-panel-header strong {
  font-size: 15px;
  display: block;
  line-height: 1.2;
  color: #1a2540;
}

.aad-ticket-badge {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 10px;
  background: #e3f0ff;
  color: #1a73e8;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.aad-panel-body {
  padding: 18px 18px 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 18px;
}

/* ── Individual field ── */
.aad-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aad-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: #455060;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.aad-req {
  color: #e53935;
  margin-left: 2px;
}

.aad-field input,
.aad-field select,
.aad-field textarea {
  padding: 9px 12px;
  border: 1.5px solid #d0d8e4;
  border-radius: 7px;
  font-size: 14px;
  color: #1a2540;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.aad-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.aad-field input:focus,
.aad-field select:focus,
.aad-field textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
}

/* ── Validation error state ── */
.aad-field.has-error input,
.aad-field.has-error select,
.aad-field.has-error textarea {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.aad-field-error {
  font-size: 11.5px;
  color: #e53935;
  min-height: 16px;
  font-weight: 500;
}

/* ── Error banner ── */
.aad-error-banner {
  margin: 0 28px 16px;
  padding: 12px 16px;
  background: #fff3f3;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  color: #c0392b;
  font-size: 14px;
  font-weight: 500;
}

/* ── Footer / submit ── */
.aad-modal-footer {
  padding: 16px 28px 28px;
  border-top: 1px solid #eef1f6;
  background: #f9fafb;
  display: flex;
  justify-content: flex-end;
}

.aad-save-btn {
  background: linear-gradient(135deg, #1a73e8 0%, #1558c0 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
  font-family: inherit;
}

.aad-save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.45);
}

.aad-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Success screen ── */
.aad-success {
  padding: 56px 40px;
  text-align: center;
}

.aad-success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
  border-radius: 50%;
  font-size: 36px;
  line-height: 72px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4);
}

.aad-success h2 {
  color: #1a2540;
  font-size: 24px;
  margin: 0 0 10px;
}

.aad-success p {
  color: #5a6676;
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.aad-close-btn {
  display: inline-block;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .aad-modal-header { padding: 20px 18px 16px; }
  .aad-panels       { padding: 14px 14px; }
  .aad-panel-body   { grid-template-columns: 1fr; }
  .aad-modal-footer { padding: 14px 18px 20px; }
  .aad-save-btn     { width: 100%; text-align: center; }
  .aad-modal-header h2 { font-size: 18px; }
}
