/**
 * COACH MINA — NATATION 2026 / 2027
 * ========================================================
 * نمط استمارة التسجيل متعددة المراحل والوصل الرسمي
 * Multi-Step Registration Wizard & Receipt Styles
 * ========================================================
 */

.registration-section {
  padding: 6rem 0;
  background-color: #f8fafc;
  background-image: linear-gradient(rgba(248,250,252,0.86), rgba(241,245,249,0.86)), var(--bg-registration);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.registration-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

/* Wizard Header Progress */
.wizard-header-bar {
  background: var(--primary-deep);
  padding: 2rem 2.5rem 1.75rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.2);
  color: var(--aqua-cyan);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.wizard-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.wizard-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.wizard-steps-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  position: relative;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  opacity: 0.55;
  transition: var(--transition);
}

.wizard-step.active {
  opacity: 1;
}

.wizard-step.completed {
  opacity: 0.9;
}

.wizard-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.wizard-step.active .wizard-step-circle {
  background: var(--aqua-cyan);
  color: var(--primary-deep);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.wizard-step.completed .wizard-step-circle {
  background: #10b981;
  color: #fff;
}

.wizard-step-label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wizard Body */
.wizard-body {
  padding: 2.5rem;
}

.form-step-content {
  display: none;
  animation: fadeInStep 0.3s ease;
}

.form-step-content.active {
  display: block;
}

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

.step-heading-row {
  margin-bottom: 2rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 1rem;
}

.step-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-deep);
}

/* Form Grid & Fields */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 0.5rem;
}

.form-label .required-star {
  color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-light);
  background-color: #ffffff;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ocean-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Gender Radio Pills */
.gender-pills-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.gender-pill-option {
  position: relative;
}

.gender-pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gender-pill-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-light);
  background: var(--bg-main);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.gender-pill-option input[type="radio"]:checked + .gender-pill-label {
  border-color: var(--ocean-blue);
  background: var(--aqua-glow);
  color: var(--ocean-blue);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.age-calc-pill {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ocean-blue);
  margin-top: 6px;
}

/* Document Upload Dropzones */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.upload-dropzone:hover {
  border-color: var(--aqua-cyan);
  background: #f0fdf4;
}

.upload-icon-symbol {
  font-size: 2rem;
  color: var(--ocean-blue);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.upload-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 0.25rem;
}

.upload-limit-info {
  font-size: 0.78rem;
  color: #94a3b8;
}

.file-hidden-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.selected-file-name {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #047857;
}

.doc-preview-area {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.doc-thumbnail {
  max-width: 90px;
  max-height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.pdf-badge-icon {
  background: #fee2e2;
  color: #b91c1c;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Group & Schedule Select View */
.selected-group-card-box {
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.group-info-price {
  unicode-bidi: isolate;
}

.group-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.badge-code {
  background: var(--primary-deep);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
}

.waitlist-banner {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.waitlist-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #92400e;
  cursor: pointer;
}

.waitlist-check-label input {
  width: 18px;
  height: 18px;
}

/* Step 4 Review & Terms */
.review-summary-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.summary-line {
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.95rem;
}

.summary-line:last-child {
  border-bottom: none;
}

.terms-fieldset {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.terms-legend {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-deep);
  padding: 0 10px;
}

.term-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1rem;
  cursor: pointer;
}

.term-item:last-child {
  margin-bottom: 0;
}

.term-item input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.term-text {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.45;
}

/* Form Action Buttons */
.wizard-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  border-top: 2px solid #f1f5f9;
  margin-top: 2rem;
}

.btn-step-prev {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border-light);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-step-prev:hover {
  background: #e2e8f0;
  color: var(--text-dark);
}

.btn-step-next {
  background: var(--ocean-blue);
  color: #fff;
  border: none;
  padding: 0.8rem 2.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-step-next:hover {
  background: #0274b0;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
}

.btn-step-submit {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border: none;
  padding: 0.9rem 2.5rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-step-submit:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-step-submit.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Progress / Alert */
.submit-progress-container {
  display: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

.submit-progress-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(2, 132, 199, 0.2);
  border-top-color: var(--ocean-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submit-progress-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ocean-blue);
}

.form-error-alert {
  display: none;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #b91c1c;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  font-weight: 700;
}

/* Success Card */
.registration-success-card {
  display: none;
  padding: 3rem 2.5rem;
  text-align: center;
  background: #ffffff;
}

.success-badge-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.2);
}

.success-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 0.75rem;
}

.success-lead-message {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Printable Official Receipt / Badge */
.official-receipt-box {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px dashed #0284c7;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  text-align: right;
  box-shadow: var(--shadow-md);
  position: relative;
}

body.ltr-layout .official-receipt-box {
  text-align: left;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.receipt-brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary-deep);
}

.receipt-season {
  font-size: 0.78rem;
  color: var(--ocean-blue);
  font-weight: 700;
}

.receipt-stamp {
  border: 2px solid #059669;
  color: #059669;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.8rem;
  transform: rotate(-6deg);
}

.receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.receipt-item-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.receipt-item-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-deep);
}

.receipt-ref-highlight {
  font-size: 1.35rem;
  color: var(--ocean-blue);
  letter-spacing: 1px;
  unicode-bidi: isolate;
}

.receipt-status-pill {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
}

.receipt-footer-instructions {
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
  border-right: 4px solid var(--ocean-blue);
}

body.ltr-layout .receipt-footer-instructions {
  border-right: none;
  border-left: 4px solid var(--ocean-blue);
}

.success-actions-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-print-voucher {
  background: var(--primary-deep);
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-print-voucher:hover {
  background: #0b253a;
  transform: translateY(-2px);
}

.btn-download-image {
  background: #059669 !important;
}

.btn-download-image:hover {
  background: #047857 !important;
  transform: translateY(-2px);
}

.btn-download-image:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-new-registration {
  background: transparent;
  color: var(--ocean-blue);
  border: 1.5px solid var(--ocean-blue);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-new-registration:hover {
  background: var(--aqua-glow);
}

/* Print Styles — handled via dedicated print window, no @media print needed on main page */

/* Responsive adjustments */
@media (max-width: 768px) {
  .wizard-header-bar {
    padding: 1.5rem;
  }
  .wizard-body {
    padding: 1.5rem;
  }
  .wizard-steps-track {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
  }
  .wizard-step {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
  }
  .wizard-step-circle {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
  }
  .wizard-step-label {
    font-size: 0.6rem;
    line-height: 1.15;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    text-align: center;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .gender-pills-wrapper {
    grid-template-columns: 1fr;
  }
  .receipt-grid {
    grid-template-columns: 1fr;
  }
  .registration-section { background-attachment: scroll; }
}

@media (max-width: 380px) {
  .wizard-step-circle {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
  .wizard-step-label {
    font-size: 0.55rem;
  }
  .wizard-steps-track {
    gap: 0.1rem;
  }
}
