/**
 * Quote modal styles.
 *
 * @package WDO
 */

/* Overlay */
.wdo-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease;
}

.wdo-modal-overlay.is-open {
  display: flex;
}

.wdo-modal-overlay.is-visible {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Modal */
.wdo-modal {
  background: var(--wdo-dark-card);
  border: 1px solid var(--wdo-border-dark);
  border-radius: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.wdo-modal-overlay.is-visible .wdo-modal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Close */
.wdo-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--wdo-border-dark);
  background: transparent;
  color: var(--wdo-text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.wdo-modal__close:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--wdo-text-primary);
}

/* Header */
.wdo-modal__header {
  padding: 40px 36px 0;
  text-align: center;
}

.wdo-modal__label {
  font-family: var(--wdo-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wdo-accent);
  margin-bottom: 12px;
}

.wdo-modal__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.wdo-modal__subtitle {
  font-size: 15px;
  color: var(--wdo-text-muted);
  margin: 0;
}

/* Progress */
.wdo-modal__progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 36px 0;
}

.wdo-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition:
    background 0.2s,
    width 0.2s,
    border-radius 0.2s;
}

.wdo-modal__dot.is-active {
  background: var(--wdo-accent);
  width: 24px;
  border-radius: 4px;
}

.wdo-modal__dot.is-complete {
  background: var(--wdo-accent);
}

/* Body */
.wdo-modal__body {
  padding: 32px 36px 36px;
}

.wdo-modal__step {
  display: none;
}

.wdo-modal__step.is-active {
  display: block;
}

.wdo-modal__question {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
  text-align: center;
}

/* Choices */
.wdo-modal__choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wdo-modal__choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--wdo-border-dark);
  background: rgba(255, 255, 255, 0.03);
  color: var(--wdo-text-primary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  text-align: left;
  width: 100%;
}

.wdo-modal__choice:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.wdo-modal__choice.is-selected {
  border-color: var(--wdo-accent);
  background: rgba(217, 119, 87, 0.1);
}

.wdo-modal__choice-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.wdo-modal__choice.is-selected .wdo-modal__choice-icon {
  background: var(--wdo-accent);
}

.wdo-modal__choice-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.wdo-modal__choice.is-selected .wdo-modal__choice-icon svg {
  stroke: var(--wdo-dark);
}

/* Fields */
.wdo-modal__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wdo-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wdo-modal__field label {
  font-family: var(--wdo-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wdo-text-muted);
}

.wdo-modal__field input,
.wdo-modal__field textarea {
  background: var(--wdo-dark);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--wdo-text-primary);
  font-family: var(--wdo-font-body);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
}

.wdo-modal__field input:focus,
.wdo-modal__field textarea:focus {
  border-color: var(--wdo-accent);
}

.wdo-modal__field input::placeholder,
.wdo-modal__field textarea::placeholder {
  color: #5c5f59;
}

.wdo-modal__field textarea {
  resize: vertical;
  min-height: 80px;
}

.wdo-modal__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Nav */
.wdo-modal__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
}

.wdo-modal__back {
  background: none;
  border: none;
  color: var(--wdo-text-muted);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.15s;
}

.wdo-modal__back:hover {
  color: var(--wdo-text-primary);
}

.wdo-modal__next {
  background: var(--wdo-accent);
  color: var(--wdo-dark);
  border: none;
  padding: 14px 28px;
  border-radius: var(--wdo-radius-full);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s;
}

.wdo-modal__next:hover {
  transform: translateY(-1px);
}

.wdo-modal__next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Success */
.wdo-modal__success {
  text-align: center;
  padding: 20px 0;
}

.wdo-modal__success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--wdo-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  color: var(--wdo-dark);
}

.wdo-modal__success h3 {
  font-size: 22px;
  margin: 0 0 8px;
}

.wdo-modal__success p {
  color: var(--wdo-text-muted);
  font-size: 15px;
  margin: 0;
}

/* Responsive */
@media (max-width: 580px) {
  .wdo-modal {
    border-radius: 16px;
    max-height: 95vh;
  }

  .wdo-modal__header {
    padding: 32px 24px 0;
  }

  .wdo-modal__body {
    padding: 24px 24px 28px;
  }

  .wdo-modal__field-row {
    grid-template-columns: 1fr;
  }
}
