/**
 * Enrollment registration — public form styles
 */

.enroll-page {
  background: var(--gray-50, #f8fafc);
}

.enroll-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 992px) {
  .enroll-layout {
    grid-template-columns: 1fr;
  }
}

.enroll-card {
  background: #fff;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid var(--gray-200, #e2e8f0);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  padding: 28px 32px;
}

.enroll-card h2 {
  font-size: 1.35rem;
  margin: 0 0 6px;
  color: var(--primary-dark, #0f172a);
}

.enroll-card .enroll-sub {
  color: var(--gray-600, #64748b);
  margin-bottom: 24px;
  font-size: 0.9375rem;
}

.enroll-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100, #f1f5f9);
}

.enroll-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.enroll-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary, #205295);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.enroll-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

@media (max-width: 640px) {
  .enroll-grid {
    grid-template-columns: 1fr;
  }
}

.enroll-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700, #334155);
  margin-bottom: 6px;
}

.enroll-field label .req {
  color: #dc2626;
}

.enroll-field input,
.enroll-field select,
.enroll-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300, #cbd5e1);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.enroll-field input:focus,
.enroll-field select:focus,
.enroll-field textarea:focus {
  outline: none;
  border-color: var(--primary, #205295);
  box-shadow: 0 0 0 3px rgba(32, 82, 149, 0.12);
}

.enroll-field textarea {
  min-height: 88px;
  resize: vertical;
}

.enroll-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 12px;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
}

.enroll-check,
.enroll-radio-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
}

.enroll-check input,
.enroll-radio-row input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.enroll-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.enroll-sidebar {
  position: sticky;
  top: 100px;
}

.enroll-pay-box {
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.enroll-pay-box h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--accent-gold, #d4a843);
}

.enroll-pay-table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.enroll-pay-table td {
  padding: 6px 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.enroll-pay-table td:first-child {
  font-weight: 600;
  width: 38%;
  color: rgba(255, 255, 255, 0.75);
}

.enroll-drop {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.enroll-drop:hover,
.enroll-drop.is-drag {
  border-color: var(--primary);
  background: rgba(32, 82, 149, 0.04);
}

.enroll-drop i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}

.enroll-file-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 0.8125rem;
}

.enroll-file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
}

.enroll-file-list button {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 0.75rem;
}

.enroll-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.enroll-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.enroll-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.enroll-schedule-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  color: #1e3a5f;
  font-size: 0.9rem;
  line-height: 1.5;
}

.enroll-schedule-banner i {
  color: #205295;
  font-size: 1.25rem;
  margin-top: 2px;
}

.enroll-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.enroll-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.enroll-other-wrap {
  margin-top: 12px;
  display: none;
}

.enroll-other-wrap.is-visible {
  display: block;
}

.enroll-notes-wrap {
  display: none;
  margin-top: 12px;
}

.enroll-notes-wrap.is-visible {
  display: block;
}

/* ==========================================================================
   Corporate polish + optional/error states
   ========================================================================== */

/* Card header treatment — a refined, corporate masthead */
.enroll-card {
  position: relative;
  overflow: hidden;
}

.enroll-card > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--gray-100, #f1f5f9);
  letter-spacing: -0.01em;
}

.enroll-card > h2 i {
  color: var(--accent-gold, #d4a843);
}

/* Section headings get a subtle left accent bar for a structured, corporate feel */
.enroll-section h3 {
  position: relative;
  padding-left: 14px;
  text-transform: none;
  letter-spacing: 0.005em;
}

.enroll-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary, #205295), var(--accent-gold, #d4a843));
}

/* "(optional)" badge next to non-required section titles */
.enroll-optional {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500, #94a3b8);
  background: var(--gray-100, #f1f5f9);
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 4px;
}

/* Inline field validation state driven by server field errors */
.enroll-field--error input,
.enroll-field--error select,
.enroll-field--error textarea {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.enroll-field--error label {
  color: #b91c1c;
}

/* Refined primary submit — corporate gradient + lift on hover */
.enroll-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary, #205295) 0%, #16406f 100%);
  border: none;
  padding: 13px 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(32, 82, 149, 0.22);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.enroll-actions .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(32, 82, 149, 0.3);
}

/* Slightly stronger, more premium card shadow */
.enroll-card {
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
}

/* ==========================================================================
   Success confirmation panel (shown after a successful submission)
   ========================================================================== */
.enroll-success-panel {
  text-align: center;
  padding: 8px 4px 4px;
  animation: enrollSuccessIn 0.4s ease;
}

@keyframes enrollSuccessIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.enroll-success-icon {
  font-size: 3.25rem;
  color: #10b981;
  margin-bottom: 8px;
  line-height: 1;
}

.enroll-success-panel h2 {
  font-size: 1.5rem;
  color: var(--primary-dark, #0f172a);
  margin: 0 0 10px;
}

.enroll-success-ref {
  font-size: 1rem;
  color: var(--gray-700, #334155);
  margin: 0 auto 22px;
  max-width: 460px;
}

.enroll-success-ref strong {
  color: var(--primary, #205295);
  letter-spacing: 0.02em;
}

.enroll-success-ref span {
  font-size: 0.8125rem;
  color: var(--gray-500, #94a3b8);
}

.enroll-success-next,
.enroll-success-pay,
.enroll-success-contact {
  text-align: left;
  max-width: 560px;
  margin: 0 auto 16px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--gray-200, #e2e8f0);
  background: var(--gray-50, #f8fafc);
}

.enroll-success-panel h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary, #205295);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.enroll-success-next p,
.enroll-success-pay p {
  font-size: 0.875rem;
  color: var(--gray-600, #64748b);
  margin: 0 0 10px;
  line-height: 1.6;
}

/* Reuse the dark pay-box styling inside the success panel */
.enroll-success-pay-box .enroll-pay-box {
  margin: 0;
}

.enroll-success-contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.enroll-success-contact-grid a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--gray-200, #e2e8f0);
  color: var(--primary, #205295);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.enroll-success-contact-grid a:hover {
  border-color: var(--primary, #205295);
  transform: translateY(-1px);
}

.enroll-success-home {
  margin-top: 6px;
}
