/* ================================================================
   4RAU — Advisor Quick Pick modal (advisor-quick.css)
   Modal gọn 4 câu, tap-to-advance. Dùng chung token màu với
   advisor-page.css (--accent v.v.) nhưng scope riêng để không
   phụ thuộc thứ tự load 2 file CSS.
   ================================================================ */

.aqm-trigger {
  --aqm-accent: #F0A500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  transition: background .15s ease, transform .15s ease;
  white-space: nowrap;
}

.aqm-trigger:hover {
  background: #2b2b2b;
  transform: translateY(-1px);
  color: #fff;
}

.aqm-trigger i { font-size: 13px; color: var(--aqm-accent); }

.aqm-overlay {
  position: fixed;
  inset: 0;
  /* .smart-call-btn (style.css) dùng z-index:9999 — modal phải cao hơn để không bị nút gọi đè lên trên mobile */
  z-index: 10000;
  background: rgba(17,17,17,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}

.aqm-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.aqm-modal {
  --aqm-accent: #F0A500;
  --aqm-accent-light: #fff8e6;
  --aqm-ink: #111111;
  --aqm-ink-soft: #666666;
  --aqm-line: #e8e6e0;
  width: 100%;
  max-width: 440px;
  max-height: min(88vh, 720px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .22s cubic-bezier(.34,1.4,.64,1);
}

.aqm-overlay.is-open .aqm-modal {
  transform: translateY(0) scale(1);
}

.aqm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
  flex: 0 0 auto;
}

.aqm-dots {
  display: flex;
  gap: 6px;
}

.aqm-dot {
  width: 22px;
  height: 5px;
  border-radius: 999px;
  background: #eeece8;
  transition: background .2s ease, width .2s ease;
}

.aqm-dot.is-done { background: var(--aqm-accent); }
.aqm-dot.is-current { background: var(--aqm-accent); width: 34px; }

.aqm-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #f3f2ee;
  color: var(--aqm-ink-soft);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
}

.aqm-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
}

.aqm-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--aqm-accent);
  margin: 6px 0 6px;
}

.aqm-question-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--aqm-ink);
  margin: 0 0 16px;
  line-height: 1.35;
}

.aqm-options {
  display: grid;
  gap: 9px;
}

.aqm-option {
  text-align: left;
  border: 1.5px solid var(--aqm-line);
  background: #fefefe;
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--aqm-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.aqm-option:active { transform: scale(.98); }

.aqm-option.is-selected {
  border-color: var(--aqm-accent);
  background: var(--aqm-accent-light);
  box-shadow: 0 0 0 1px var(--aqm-accent);
}

.aqm-option-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f3f2ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex: 0 0 38px;
}

.aqm-option.is-selected .aqm-option-icon { background: var(--aqm-accent); }

.aqm-option-label {
  font-weight: 650;
  font-size: 14px;
  line-height: 1.35;
}

.aqm-back {
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--aqm-ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

/* Loading */

.aqm-loading {
  padding: 50px 16px;
  text-align: center;
}

.aqm-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--aqm-line);
  border-top-color: var(--aqm-accent);
  margin: 0 auto 16px;
  animation: aqm-spin .8s linear infinite;
}

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

.aqm-loading-text {
  font-size: 13.5px;
  color: var(--aqm-ink-soft);
  margin: 0;
}

/* Result */

.aqm-result-head {
  margin-bottom: 14px;
}

.aqm-result-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--aqm-ink);
  margin: 0 0 4px;
}

.aqm-result-sub {
  font-size: 12.5px;
  color: var(--aqm-ink-soft);
  margin: 0;
}

.aqm-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.aqm-step {
  display: flex;
  gap: 12px;
  border: 1.5px solid var(--aqm-line);
  border-radius: 14px;
  padding: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.aqm-step.is-main {
  border-color: var(--aqm-accent);
  background: var(--aqm-accent-light);
}

.aqm-step-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f2ee;
  flex: 0 0 52px;
}

.aqm-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.aqm-step-role {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--aqm-ink-soft);
}

.aqm-step.is-main .aqm-step-role { color: #a06e00; }

.aqm-step-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--aqm-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aqm-step-price {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--aqm-accent-hover, #d99200);
}

.aqm-step-arrow {
  color: var(--aqm-ink-soft);
  font-size: 13px;
  flex: 0 0 auto;
}

.aqm-buyall {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: var(--aqm-ink);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
}

.aqm-buyall:disabled { opacity: .6; cursor: default; }

.aqm-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.aqm-redo {
  background: none;
  border: none;
  color: var(--aqm-ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.aqm-full-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--aqm-accent-hover, #d99200);
  text-decoration: none;
}

.aqm-error {
  padding: 40px 16px;
  text-align: center;
  font-size: 13.5px;
  color: #c0392b;
}

.aqm-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 0);
  background: #111;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10050;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.aqm-toast.show { opacity: 1; }

@media (max-width: 480px) {
  .aqm-overlay { padding: 0; align-items: flex-end; }
  .aqm-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}
