/* ── Modal Overlay ─────────────────────────────────────────────────────────── */
.dasp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.dasp-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Modal Box ─────────────────────────────────────────────────────────────── */
.dasp-modal {
  background: #fff;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.dasp-modal-overlay.active .dasp-modal {
  transform: translateY(0) scale(1);
}

/* ── Modal Header ──────────────────────────────────────────────────────────── */
.dasp-modal__header {
  background: #b92c00;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.dasp-modal__header-text h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.dasp-modal__header-text p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.dasp-modal__close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
  line-height: 1;
}

.dasp-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Progress Bar ──────────────────────────────────────────────────────────── */
.dasp-modal__progress {
  background: #f0f0f0;
  height: 4px;
  flex-shrink: 0;
}

.dasp-modal__progress-bar {
  height: 100%;
  background: #008db9;
  transition: width 0.4s ease;
  width: 0%;
}

/* ── Section Tabs ──────────────────────────────────────────────────────────── */
.dasp-modal__sections {
  display: flex;
  border-bottom: 1px solid #eee;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.dasp-modal__sections::-webkit-scrollbar {
  display: none;
}

.dasp-modal__section-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #999;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  cursor: default;
  transition:
    color 0.2s,
    border-color 0.2s;
  font-family: "Poppins", sans-serif;
}

.dasp-modal__section-tab.active {
  color: #b92c00;
  border-bottom-color: #b92c00;
}

.dasp-modal__section-tab.completed {
  color: #008db9;
}

/* ── Scrollable Body ───────────────────────────────────────────────────────── */
.dasp-modal__body {
  overflow-y: auto;
  flex: 1;
  padding: 1.75rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.dasp-modal__body::-webkit-scrollbar {
  width: 5px;
}

.dasp-modal__body::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}

/* ── Section Panel ─────────────────────────────────────────────────────────── */
.dasp-section-panel {
  display: none;
}

.dasp-section-panel.active {
  display: block;
}

.dasp-section-panel__heading {
  margin-bottom: 0.3rem;
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  color: #111;
}

.dasp-section-panel__desc {
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

/* ── Field Styles ──────────────────────────────────────────────────────────── */
.dasp-field {
  margin-bottom: 1.25rem;
}

.dasp-field label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.4rem;
}

.dasp-field__desc {
  font-size: 0.76rem;
  color: #777;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.dasp-field input[type="text"],
.dasp-field input[type="email"],
.dasp-field input[type="tel"],
.dasp-field select,
.dasp-field textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 0.88rem;
  color: #111;
  background: #fafafa;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.dasp-field input:focus,
.dasp-field select:focus,
.dasp-field textarea:focus {
  border-color: #008db9;
  box-shadow: 0 0 0 3px rgba(0, 141, 185, 0.12);
  background: #fff;
}

.dasp-field textarea {
  resize: vertical;
  min-height: 100px;
}

.dasp-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Checkbox / Radio ──────────────────────────────────────────────────────── */
.dasp-field__options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dasp-field__option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid #eee;
  border-radius: 8px;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.dasp-field__option:hover {
  border-color: #008db9;
  background: rgba(0, 141, 185, 0.04);
}

.dasp-field__option input[type="checkbox"],
.dasp-field__option input[type="radio"] {
  margin-top: 2px;
  accent-color: #008db9;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.dasp-field__option span {
  font-size: 0.83rem;
  color: #333;
  line-height: 1.45;
}

.dasp-field__option.selected {
  border-color: #008db9;
  background: rgba(0, 141, 185, 0.06);
}

/* ── Field Error ───────────────────────────────────────────────────────────── */
.dasp-field--error input,
.dasp-field--error select,
.dasp-field--error textarea {
  border-color: #b92c00;
  box-shadow: 0 0 0 3px rgba(185, 44, 0, 0.1);
}

.dasp-field__error {
  font-size: 0.75rem;
  color: #b92c00;
  margin-top: 0.35rem;
  display: none;
}

.dasp-field--error .dasp-field__error {
  display: block;
}

/* ── Footer / Navigation ───────────────────────────────────────────────────── */
.dasp-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-top: 1px solid #eee;
  flex-shrink: 0;
  gap: 1rem;
}

.dasp-modal__step-info {
  font-size: 0.78rem;
  color: #999;
  font-weight: 500;
}

.dasp-modal__nav {
  display: flex;
  gap: 0.75rem;
}

.dasp-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    background 0.2s,
    opacity 0.2s,
    transform 0.1s;
}

.dasp-btn:active {
  transform: scale(0.97);
}

.dasp-btn--back {
  background: #f0f0f0;
  color: #444;
}

.dasp-btn--back:hover {
  background: #e4e4e4;
}

.dasp-btn--next {
  background: #008db9;
  color: #fff;
}

.dasp-btn--next:hover {
  background: #007aa3;
}

.dasp-btn--submit {
  background: #b92c00;
  color: #fff;
}

.dasp-btn--submit:hover {
  background: #a02500;
}

.dasp-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── State Screens ─────────────────────────────────────────────────────────── */
.dasp-modal__state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  min-height: 300px;
}

.dasp-modal__state.active {
  display: flex;
}

.dasp-modal__state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.dasp-modal__state h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  color: #111;
  margin-bottom: 0.5rem;
}

.dasp-modal__state p {
  font-size: 0.88rem;
  color: #666;
  max-width: 360px;
  line-height: 1.6;
}

/* Loading spinner */
.dasp-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #f0f0f0;
  border-top-color: #008db9;
  border-radius: 50%;
  animation: dasp-spin 0.7s linear infinite;
  margin-bottom: 1rem;
}

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

/* ── Closed State Banner ───────────────────────────────────────────────────── */
.dasp-modal__closed {
  padding: 2rem;
  text-align: center;
  display: none;
}

.dasp-modal__closed.active {
  display: block;
}

.dasp-modal__closed-banner {
  background: #fff8f6;
  border: 1.5px solid #f5c0b0;
  border-radius: 10px;
  padding: 2rem;
}

.dasp-modal__closed-banner p {
  color: #b92c00;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.dasp-modal__closed-banner span {
  font-size: 0.83rem;
  color: #777;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .dasp-modal {
    max-height: 95vh;
    border-radius: 12px;
  }

  .dasp-modal__header {
    padding: 1.25rem 1.25rem;
  }

  .dasp-modal__body {
    padding: 1.25rem;
  }

  .dasp-modal__footer {
    padding: 0.85rem 1.25rem;
    flex-wrap: wrap;
  }

  .dasp-modal__step-info {
    width: 100%;
    text-align: center;
    order: -1;
  }

  .dasp-modal__nav {
    width: 100%;
    justify-content: space-between;
  }

  .dasp-btn {
    flex: 1;
    text-align: center;
  }
}
