/* ==========================================================================
   LEARN WITH JC - STUDENT REGISTRATION MODAL
   Pixel-Perfect Match to UI Design Mockup
   ========================================================================== */

/* Modal Backdrop */
.reg-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(12, 28, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.reg-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Modal Dialog Window */
.reg-modal-dialog {
  background: #ffffff;
  border-radius: 28px;
  width: 100%;
  max-width: 1060px;
  display: flex;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
  transform: scale(0.95) translateY(14px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100vh - 48px);
}

.reg-modal-backdrop.is-open .reg-modal-dialog {
  transform: scale(1) translateY(0);
}

/* ==========================================================================
   LEFT COLUMN - BRANDING, STUDENT VISUAL & VALUE PROPOSITIONS
   ========================================================================== */
.reg-modal-left {
  width: 37%;
  min-width: 350px;
  background: linear-gradient(155deg, #08401d 0%, #0d5427 30%, #157136 65%, #1f8d44 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 32px 32px;
  overflow: hidden;
  color: #ffffff;
  flex-shrink: 0;
}

/* Layered organic wave curves matching mockup */
.reg-left-waves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.reg-left-waves svg {
  position: absolute;
  width: 140%;
  height: 140%;
  top: -10%;
  left: -20%;
}

.reg-left-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* Brand Header */
.reg-brand-box {
  margin-bottom: 6px;
}

.reg-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  margin-bottom: 12px;
}

.reg-brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.reg-brand-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #ffffff;
  line-height: 1.2;
}

/* Student Visual Cutout */
.reg-student-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 10px 0 16px;
  position: relative;
}

.reg-student-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  left: 20px;
  top: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 218, 89, 0.3) 0%, rgba(124, 218, 89, 0) 70%);
  filter: blur(28px);
  z-index: 1;
}

.reg-student-img {
  max-width: 270px;
  width: 86%;
  height: auto;
  max-height: 290px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 16px 24px rgba(4, 28, 12, 0.45));
  transition: transform 0.4s ease;
}

.reg-modal-dialog:hover .reg-student-img {
  transform: translateY(-2px) scale(1.015);
}

/* Join Learn with JC Benefits */
.reg-benefits {
  margin-top: auto;
}

.reg-benefits-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
  letter-spacing: -0.2px;
}

.reg-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reg-benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reg-benefit-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.reg-benefit-icon svg {
  width: 17px;
  height: 17px;
}

.reg-benefit-text {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.1px;
}

/* ==========================================================================
   RIGHT COLUMN - REGISTRATION FORM
   ========================================================================== */
.reg-modal-right {
  width: 63%;
  padding: 34px 38px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  max-height: calc(100vh - 48px);
  background: #ffffff;
}

/* Sleek Close Button */
.reg-close-btn {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.reg-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

/* Header Typography */
.reg-header {
  margin-bottom: 18px;
  padding-right: 40px;
}

.reg-header-title {
  font-size: 29px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.6px;
  line-height: 1.2;
}

.reg-header-desc {
  font-size: 14px;
  color: #64748b;
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
}

/* Step Navigation Bar */
.reg-steps-bar {
  background: #f1f5f9;
  border-radius: 9999px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  width: 100%;
}

.reg-step-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.25s ease;
}

.reg-step-item .reg-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #d1fae5;
  color: #166534;
  transition: all 0.25s ease;
}

/* Active Step */
.reg-step-item.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.reg-step-item.active .reg-step-badge {
  background: #145a2d;
  color: #ffffff;
}

/* Completed Step */
.reg-step-item.completed .reg-step-badge {
  background: #15803d;
  color: #ffffff;
}

/* Form Section Cards */
.reg-form-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: #ffffff;
}

.reg-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.reg-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reg-card-icon svg {
  width: 15px;
  height: 15px;
}

.reg-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.2px;
}

/* Fields Layout */
.reg-personal-grid {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 14px;
  align-items: stretch;
}

.reg-inputs-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 14px;
}

.reg-field-group {
  display: flex;
  flex-direction: column;
}

.reg-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.reg-req {
  color: #ef4444;
  font-weight: 700;
}

.reg-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.reg-input-icon {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reg-input,
.reg-select,
.reg-textarea {
  width: 100%;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: #1e293b;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.reg-input-wrap .reg-input {
  padding-left: 36px;
}

.reg-input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.reg-input:focus,
.reg-select:focus,
.reg-textarea:focus {
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.reg-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* Upload Photo Box */
.reg-photo-card {
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 104px;
}

.reg-photo-card:hover {
  border-color: #15803d;
  background: #f0fdf4;
}

.reg-photo-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  margin-bottom: 4px;
}

.reg-photo-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}

.reg-photo-hint {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.2;
}

/* Photo Preview state */
.reg-photo-preview-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
}

.reg-photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reg-photo-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
}

/* Course & Enrollment Grid */
.reg-course-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 12px 14px;
}

/* Step 2 Grid */
.reg-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

/* Textarea */
.reg-textarea {
  height: 75px;
  resize: vertical;
}

/* Modal Actions Footer */
.reg-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.reg-btn-cancel,
.reg-btn-back {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reg-btn-cancel:hover,
.reg-btn-back:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.reg-btn-next,
.reg-btn-submit {
  background: #145a2d;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 26px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(20, 90, 45, 0.25);
}

.reg-btn-next:hover,
.reg-btn-submit:hover {
  background: #0f4823;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 90, 45, 0.32);
}

.reg-btn-next svg,
.reg-btn-submit svg {
  transition: transform 0.2s ease;
}

.reg-btn-next:hover svg {
  transform: translateX(3px);
}

/* Step Panes */
.reg-step-pane {
  display: none;
  animation: regFadeIn 0.3s ease;
}

.reg-step-pane.active {
  display: block;
}

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

/* Review Step Styling */
.reg-review-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.reg-review-item {
  display: flex;
  flex-direction: column;
}

.reg-review-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.reg-review-value {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  margin-top: 2px;
}

.reg-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.4;
  margin: 12px 0 4px;
  cursor: pointer;
}

.reg-terms-check input {
  margin-top: 2px;
  accent-color: #15803d;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Success View */
.reg-success-view {
  text-align: center;
  padding: 36px 20px;
  display: none;
  animation: regFadeIn 0.4s ease;
}

.reg-success-view.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.reg-success-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 0 8px rgba(220, 252, 231, 0.4);
}

.reg-success-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.reg-success-desc {
  font-size: 14px;
  color: #475569;
  max-width: 440px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.reg-regid-box {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
}

/* Validation Feedback */
.reg-input.is-invalid,
.reg-select.is-invalid {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 980px) {
  .reg-modal-dialog {
    flex-direction: column;
    max-height: 92vh;
    border-radius: 20px;
  }

  .reg-modal-left {
    width: 100%;
    min-width: unset;
    padding: 22px 20px 16px;
  }

  .reg-student-wrap {
    display: none;
  }

  .reg-modal-right {
    width: 100%;
    padding: 22px 20px 22px;
  }

  .reg-personal-grid {
    grid-template-columns: 1fr;
  }

  .reg-course-grid {
    grid-template-columns: 1fr;
  }

  .reg-photo-card {
    height: 64px;
    min-height: unset;
    flex-direction: row;
    gap: 12px;
  }

  .reg-photo-icon-box {
    margin-bottom: 0;
  }
}

@media (max-width: 580px) {
  .reg-modal-backdrop {
    padding: 8px;
  }

  .reg-modal-dialog {
    border-radius: 16px;
  }

  .reg-inputs-subgrid,
  .reg-contact-grid {
    grid-template-columns: 1fr;
  }

  .reg-steps-bar {
    padding: 2px;
  }

  .reg-step-item {
    font-size: 12px;
    padding: 6px 8px;
    gap: 4px;
  }

  .reg-step-item .reg-step-badge {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .reg-header-title {
    font-size: 22px;
  }

  .reg-modal-actions {
    flex-direction: column-reverse;
  }

  .reg-btn-cancel,
  .reg-btn-back,
  .reg-btn-next,
  .reg-btn-submit {
    width: 100%;
    justify-content: center;
  }
}
