/* ADSL signup modal — site public wizard (ecare-compatible checkout + OTP) */
.asl-modal-open { overflow: hidden; }

.asl-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 20px);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.asl-backdrop[hidden] { display: none !important; }

.asl-dialog {
  width: min(940px, 100%);
  max-height: min(92vh, 880px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 28px 72px rgba(15, 23, 42, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
  direction: rtl;
  font-family: inherit;
  color: #0f172a;
}

.asl-dialog__head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8edf2;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(14, 165, 233, 0.08), transparent 55%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.asl-dialog__title-wrap { min-width: 0; flex: 1; }

.asl-dialog__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.asl-dialog__title {
  margin: 0;
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 900;
  line-height: 1.4;
  color: #0f172a;
}

.asl-dialog__sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.65;
  max-width: 52ch;
}

.asl-close {
  flex: none;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.asl-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.04);
}

/* ── Stepper ─────────────────────────────────────────────── */
.asl-stepper-wrap {
  flex: none;
  padding: 0 16px;
  background: #fafbfc;
  border-bottom: 1px solid #e8edf2;
}

.asl-stepper {
  display: flex;
  gap: 0;
  padding: 14px 8px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.asl-stepper::-webkit-scrollbar { display: none; }

.asl-step {
  flex: 1 1 0;
  min-width: 72px;
  max-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  position: relative;
  padding: 0 6px 2px;
}

.asl-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  inset-inline-start: calc(50% + 14px);
  width: calc(100% - 28px);
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
  border-radius: 1px;
  pointer-events: none;
}

.asl-step.is-done:not(:last-child)::after,
.asl-step.is-active:not(:last-child)::after {
  background: linear-gradient(90deg, #0ea5e9, #bae6fd);
}

.asl-step__dot {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: #e2e8f0;
  color: #64748b;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
  transition: background .2s, box-shadow .2s, transform .2s;
}

.asl-step.is-active .asl-step__dot {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18);
  transform: scale(1.05);
}

.asl-step.is-done .asl-step__dot {
  background: #0ea5e9;
  color: #fff;
}

.asl-step__label {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
}

.asl-step.is-active .asl-step__label,
.asl-step.is-done .asl-step__label { color: #334155; }

.asl-step.is-active .asl-step__label { font-weight: 800; }

/* ── Message banner ────────────────────────────────────── */
.asl-msg {
  flex: none;
  margin: 12px 24px 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.asl-msg[hidden] { display: none !important; }
.asl-msg--err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.asl-msg--ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.asl-msg--info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── Body & layout ─────────────────────────────────────── */
.asl-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 18px 24px 10px;
  display: flex;
  flex-direction: column;
}

.asl-body__inner {
  flex: 1 1 auto;
  min-height: 0;
  animation: asl-fade-in .22s ease;
}

@keyframes asl-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.asl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 20px;
  align-items: start;
  height: 100%;
  min-height: 0;
}

.asl-panel {
  min-width: 0;
  min-height: 0;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-inline-end: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.asl-panel::-webkit-scrollbar { width: 5px; }
.asl-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

.asl-panel--solo {
  max-width: 520px;
  margin: 0 auto;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.asl-panel__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.asl-panel__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.65;
}

/* ── Form fields ───────────────────────────────────────── */
.asl-field { margin-bottom: 14px; }
.asl-field:last-child { margin-bottom: 0; }

.asl-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.asl-input,
.asl-select,
.asl-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  background: #fff;
  color: #0f172a;
  transition: border-color .15s, box-shadow .15s;
}
.asl-input:focus,
.asl-select:focus,
.asl-textarea:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.asl-textarea { min-height: 96px; resize: vertical; }

.asl-phone-row {
  display: grid;
  grid-template-columns: minmax(120px, 140px) minmax(0, 1fr);
  gap: 10px;
}

/* ── Service search & list ─────────────────────────────── */
.asl-search {
  position: relative;
  margin-bottom: 12px;
}

.asl-search__input {
  padding-inline-start: 38px;
}

.asl-search__icon {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
  line-height: 1;
}

.asl-services-wrap {
  border: 1px solid #e8edf2;
  border-radius: 14px;
  background: #fafbfc;
  padding: 10px;
}

.asl-services {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow-y: auto;
  padding-inline-end: 2px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.asl-services::-webkit-scrollbar { width: 5px; }
.asl-services::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

.asl-services-empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

.asl-service {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .12s;
}
.asl-service:hover {
  border-color: #7dd3fc;
  background: #f0f9ff;
}
.asl-service.is-selected {
  border-color: #0284c7;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.asl-service input {
  flex: none;
  margin-top: 3px;
  accent-color: #0284c7;
  width: 16px;
  height: 16px;
}

.asl-service__body { min-width: 0; flex: 1; }

.asl-service__name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.45;
  word-break: break-word;
}

.asl-service__price {
  font-size: 13px;
  color: #0369a1;
  font-weight: 700;
  margin: 0;
}

/* ── Add-ons ───────────────────────────────────────────── */
.asl-addons {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #e2e8f0;
}

.asl-addon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.asl-addon:hover:not(.is-locked) {
  border-color: #bae6fd;
  background: #f8fcff;
}
.asl-addon.is-locked {
  opacity: .88;
  cursor: default;
  background: #f8fafc;
}
.asl-addon input { accent-color: #0284c7; flex: none; }
.asl-addon__price {
  margin-inline-start: auto;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  flex: none;
}

/* ── Invoice sidebar ───────────────────────────────────── */
.asl-invoice {
  position: sticky;
  top: 0;
  align-self: start;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  max-height: min(52vh, 480px);
  overflow-y: auto;
}

.asl-invoice--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 140px;
  gap: 8px;
}

.asl-invoice__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 18px;
}

.asl-invoice__title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.asl-invoice__title::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #0284c7, #0ea5e9);
}

.asl-invoice__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #475569;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.asl-invoice__row span:first-child {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  word-break: break-word;
}
.asl-invoice__row strong,
.asl-invoice__row > span:last-child {
  flex: none;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}
.asl-invoice__row:last-of-type { border-bottom: none; }

.asl-invoice__total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}
.asl-invoice__total span:last-child {
  color: #b45309;
  font-size: 15px;
}

/* ── Step 4 summary ────────────────────────────────────── */
.asl-summary {
  display: grid;
  gap: 10px;
}

.asl-summary__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
}
.asl-summary__item strong {
  flex: none;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
}
.asl-summary__item span {
  min-width: 0;
  text-align: left;
  color: #0f172a;
  font-weight: 700;
  word-break: break-word;
}
.asl-summary__item--highlight {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}
.asl-summary__item--highlight span {
  color: #b45309;
  font-size: 14px;
}

/* ── OTP step ──────────────────────────────────────────── */
.asl-captcha-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.asl-captcha-img {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  flex: none;
}
.asl-captcha-refresh {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.asl-captcha-refresh:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.asl-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

/* ── Footer ────────────────────────────────────────────── */
.asl-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 18px;
  border-top: 1px solid #e8edf2;
  background: #fafbfc;
}

.asl-foot__back {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 6px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.asl-foot__back:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.asl-foot__back[hidden] { display: none !important; }

.asl-foot__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.asl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, opacity .15s, transform .12s, box-shadow .15s;
}
.asl-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
.asl-btn--primary:not(:disabled):active { transform: scale(0.98); }

.asl-btn--primary {
  background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #f59e0b 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(180, 83, 9, 0.28);
}
.asl-btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #92400e 0%, #b45309 55%, #d97706 100%);
  box-shadow: 0 10px 26px rgba(180, 83, 9, 0.32);
}

.asl-btn--ghost {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

/* ── Success ───────────────────────────────────────────── */
.asl-success {
  text-align: center;
  padding: 36px 16px 28px;
  max-width: 440px;
  margin: 0 auto;
}
.asl-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #16a34a;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.18);
}
.asl-success__title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 900;
  color: #0f172a;
}
.asl-success__text {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.75;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .asl-dialog {
    max-height: 96vh;
    border-radius: 16px;
  }

  .asl-dialog__head {
    padding: 16px 16px 12px;
  }

  .asl-stepper-wrap { padding: 0 8px; }

  .asl-step {
    min-width: 64px;
    padding: 0 4px 2px;
  }

  .asl-step__label { font-size: 9.5px; }

  .asl-msg { margin: 10px 16px 0; }

  .asl-body { padding: 14px 16px 8px; }

  .asl-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .asl-panel {
    max-height: none;
    overflow: visible;
    padding-inline-end: 0;
  }

  .asl-invoice {
    position: static;
    max-height: none;
    order: -1;
  }

  .asl-services {
    max-height: min(38vh, 280px);
  }

  .asl-foot {
    padding: 12px 16px 16px;
    flex-wrap: wrap;
  }

  .asl-foot__actions {
    width: 100%;
    margin-inline-start: 0;
  }

  .asl-btn {
    flex: 1;
    min-width: 0;
  }

  .asl-name-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .asl-phone-row { grid-template-columns: 1fr; }

  .asl-step:not(:last-child)::after {
    inset-inline-start: calc(50% + 12px);
    width: calc(100% - 24px);
  }

  .asl-step__dot {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .asl-step:not(:last-child)::after { top: 12px; }
}
