/* Sainina Hill — distributor registration page */

/* Banner */
.reg-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  color: #f7f2e8;
  isolation: isolate;
}

.reg-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../assets/hills-2.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
}

.reg-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(23, 17, 6, 0.92) 0%, rgba(23, 17, 6, 0.76) 50%, rgba(36, 25, 8, 0.7) 100%),
    radial-gradient(ellipse 50% 60% at 85% 50%, rgba(184, 146, 63, 0.28), transparent 65%);
}

.reg-hero .eyebrow {
  color: var(--gold-soft);
}

.reg-hero h1 {
  margin: 0.4rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
}

.reg-hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
}

.reg-hero p {
  margin: 0;
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(244, 239, 228, 0.82);
}

/* Layout */
.reg-body {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(ellipse 45% 40% at 100% 0%, rgba(201, 162, 94, 0.16), transparent 55%),
    linear-gradient(180deg, #f7f4ee 0%, #efe8da 100%);
}

.reg-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.reg-card {
  padding: clamp(1.5rem, 3vw, 2.35rem);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

/* Form sections */
.reg-section + .reg-section {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(169, 127, 61, 0.2);
}

.reg-section-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.reg-step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--bronze), var(--gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.reg-section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.reg-section-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.15rem;
}

.reg-field {
  display: block;
}

.reg-field.reg-span-2 {
  grid-column: span 2;
}

.reg-field > .reg-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.reg-req {
  color: #b4451f;
  margin-left: 0.15rem;
}

/* Inputs — targets the rendered ASP.NET controls */
.reg-card .form-control {
  width: 100%;
  border: 1.5px solid rgba(169, 127, 61, 0.28);
  border-radius: 10px;
  padding: 0.78rem 0.95rem;
  font: inherit;
  font-size: 0.96rem;
  background: #fffcf7;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.reg-card select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a97f3d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}

.reg-card .form-control::placeholder {
  color: rgba(107, 99, 88, 0.6);
}

.reg-card .form-control:focus {
  outline: none;
  background: #fff;
  border-color: var(--bronze);
  box-shadow: 0 0 0 4px rgba(201, 162, 94, 0.18);
}

.reg-card .form-control[disabled],
.reg-card .form-control:disabled {
  background: #f2ece1;
  color: var(--muted);
  cursor: not-allowed;
}

.reg-card textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

/* Name field — title dropdown joined to the name input */
.reg-combo {
  display: flex;
  align-items: stretch;
  border: 1.5px solid rgba(169, 127, 61, 0.28);
  border-radius: 10px;
  background: #fffcf7;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-combo:focus-within {
  border-color: var(--bronze);
  box-shadow: 0 0 0 4px rgba(201, 162, 94, 0.18);
}

.reg-combo select {
  border: 0;
  border-right: 1.5px solid rgba(169, 127, 61, 0.22);
  background: rgba(201, 162, 94, 0.1);
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--accent-deep);
  cursor: pointer;
}

.reg-combo select:focus {
  outline: none;
}

.reg-combo .form-control,
.reg-combo input {
  flex: 1;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Date of birth trio */
.reg-dob {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

/* Password reveal */
.reg-reveal {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.reg-reveal input {
  width: 15px;
  height: 15px;
  accent-color: var(--bronze);
  cursor: pointer;
}

/* Agreements */
.reg-agree {
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(169, 127, 61, 0.28);
  border-radius: 12px;
  background: rgba(201, 162, 94, 0.09);
}

.reg-agree-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.reg-agree-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--bronze);
  cursor: pointer;
}

.reg-agree-row a {
  font-weight: 800;
  color: var(--bronze);
}

.reg-agree-row a:hover {
  text-decoration: underline;
}

.reg-hint {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Submit */
.reg-actions {
  margin-top: 1.5rem;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.reg-submit {
  min-width: 240px;
  border: 0;
  font-family: inherit;
}

.reg-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Aside */
.reg-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
  display: grid;
  gap: 1.25rem;
}

.reg-aside-card {
  padding: 1.65rem 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(150deg, var(--accent-deep), #2a1e0c 60%, #3a2a14);
  color: #f4efe4;
  box-shadow: var(--shadow);
}

.reg-aside-card h3 {
  margin: 0.35rem 0 1.1rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
}

.reg-aside-card .eyebrow {
  color: var(--gold-soft);
}

.reg-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.reg-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.93rem;
  line-height: 1.5;
  color: rgba(244, 239, 228, 0.82);
}

.reg-benefits svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--gold-soft);
}

.reg-help {
  padding: 1.5rem;
  border: 1px solid rgba(169, 127, 61, 0.28);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.72);
}

.reg-help h4 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.reg-help p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.reg-help-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(169, 127, 61, 0.2);
}

.reg-help-row span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze);
}

.reg-help-row strong {
  font-size: 0.98rem;
}

.reg-login-note {
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(169, 127, 61, 0.2);
  font-size: 0.88rem;
  color: var(--muted);
}

.reg-login-note a {
  font-weight: 800;
  color: var(--bronze);
}

.reg-login-note a:hover {
  text-decoration: underline;
}

/* Fields kept for the code-behind but not shown */
.reg-hidden {
  display: none;
}

/* E-contract modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(23, 17, 6, 0.75);
  backdrop-filter: blur(4px);
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-overlay.is-open {
  display: block;
}

.modal-box {
  position: relative;
  width: min(1050px, 100%);
  margin: 3vh auto;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: modal-in 0.3s var(--ease);
}

.close-btn {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.close-btn:hover {
  background: rgba(201, 162, 94, 0.16);
  color: var(--accent-deep);
}

.modal-header {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-align: center;
  color: var(--ink);
}

.modal-content {
  max-height: 70vh;
  overflow-y: auto;
}

.modal-content iframe {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading overlay */
.reg-progress {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(23, 17, 6, 0.72);
  backdrop-filter: blur(3px);
}

.reg-progress-inner {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reg-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(232, 207, 160, 0.25);
  border-top-color: var(--gold-soft);
  border-radius: 50%;
  animation: reg-spin 0.8s linear infinite;
}

@keyframes reg-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .reg-layout {
    grid-template-columns: 1fr;
  }

  .reg-aside {
    position: static;
  }
}

@media (max-width: 640px) {
  .reg-grid {
    grid-template-columns: 1fr;
  }

  .reg-field.reg-span-2 {
    grid-column: span 1;
  }
}
