/* ============================================================
   ap-guidance.css — Sprint 9E: Guided Experience™
   Academic Planner AI
   ============================================================ */

/* ============== ONBOARDING OVERLAY ============== */

.ap-onboarding {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 24px;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.ap-onboarding.is-open {
  opacity: 1;
}

.ap-onboarding__card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  padding: 40px 40px 32px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  position: relative;
  animation: ap-onb-up 0.38s cubic-bezier(0.21, 0.47, 0.32, 0.98) forwards;
}

@keyframes ap-onb-up {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ap-onboarding__skip {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
  border-radius: 6px;
  transition: color 0.15s;
}
.ap-onboarding__skip:hover { color: #475569; }

.ap-onboarding__dots {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}

.ap-onboarding__dot {
  height: 8px;
  width: 8px;
  border-radius: 4px;
  background: #E2E8F0;
  transition: width 0.25s ease, background 0.25s ease;
  flex-shrink: 0;
}

.ap-onboarding__dot.is-active {
  width: 28px;
  background: #2563EB;
}

.ap-onboarding__icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 14px;
  line-height: 1;
}

.ap-onboarding__step-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2563EB;
  margin-bottom: 8px;
}

.ap-onboarding__title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1E3A8A;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.ap-onboarding__desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 32px;
}

.ap-onboarding__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

@media (max-width: 540px) {
  .ap-onboarding__card {
    padding: 32px 24px 24px;
  }
  .ap-onboarding__title {
    font-size: 1.2rem;
  }
  .ap-onboarding__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ============== PROGRESS CHECKLIST (dashboard) ============== */

.ap-checklist {
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  padding: 18px 22px 14px;
  margin-bottom: 24px;
}

.ap-checklist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.ap-checklist__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1E3A8A;
}

.ap-checklist__pct {
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 500;
  white-space: nowrap;
}

.ap-checklist__bar-wrap {
  height: 5px;
  background: #E2E8F0;
  border-radius: 3px;
  margin-bottom: 14px;
  overflow: hidden;
}

.ap-checklist__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #10B981);
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.ap-checklist__items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 20px;
}

.ap-checklist__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #94A3B8;
}

.ap-checklist__item.is-done {
  color: #334155;
  font-weight: 500;
}

.ap-checklist__check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ap-checklist__item.is-done .ap-checklist__check {
  background: #10B981;
  border-color: #10B981;
  color: #fff;
}

.ap-checklist__footer {
  margin-top: 12px;
  text-align: right;
}

.ap-checklist__dismiss {
  font-size: 0.77rem;
  color: #94A3B8;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 4px;
  transition: color 0.15s;
}
.ap-checklist__dismiss:hover { color: #64748B; }

@media (max-width: 600px) {
  .ap-checklist__items { grid-template-columns: 1fr; }
}

/* ============== GUIDANCE PROCESS BLOCK ============== */

.ap-process-block {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0FDF4 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.15);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ap-process-block__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ap-process-block__title {
  font-size: 0.93rem;
  font-weight: 700;
  color: #1E3A8A;
  margin-bottom: 5px;
}

.ap-process-block__text {
  font-size: 0.87rem;
  color: #475569;
  line-height: 1.6;
}

.ap-process-block__steps {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ap-process-block__step {
  font-size: 0.83rem;
  color: #475569;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ap-process-block__step-num {
  font-size: 0.7rem;
  font-weight: 700;
  background: #2563EB;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============== MICROAYUDA TOOLTIP ============== */

.ap-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ap-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #64748B;
  font-size: 0.6rem;
  font-weight: 800;
  cursor: help;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
  font-style: normal;
  line-height: 1;
  user-select: none;
}

.ap-tip-icon:hover,
.ap-tip-icon:focus {
  background: #2563EB;
  color: #fff;
  outline: none;
}

/* Bubble is a sibling (appended to body) */
.ap-tip-bubble {
  position: absolute;
  z-index: 600;
  background: #1E293B;
  color: #F1F5F9;
  font-size: 0.8rem;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 260px;
  width: max-content;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ap-tip-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============== SMART EMPTY STATE ============== */

.ap-empty {
  text-align: center;
  padding: 48px 24px 40px;
}

.ap-empty__icon {
  font-size: 3.2rem;
  margin-bottom: 16px;
  line-height: 1;
  display: block;
}

.ap-empty__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1E3A8A;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.ap-empty__intro {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 18px;
  line-height: 1.65;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.ap-empty__list {
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 400px;
}

.ap-empty__list-item {
  font-size: 0.86rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 9px;
}

.ap-empty__list-check {
  font-size: 0.75rem;
  font-weight: 800;
  color: #10B981;
  flex-shrink: 0;
}

/* ============== CONFIDENCE BLOCK (pre-action) ============== */

.ap-confidence {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ap-confidence__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ap-confidence__title {
  font-size: 0.87rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.ap-confidence__rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ap-confidence__row {
  font-size: 0.81rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ap-confidence__row strong {
  color: #334155;
}

/* ============== INLINE GUIDE TIP (contextual aside) ============== */

.ap-guide-tip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(37, 99, 235, 0.04);
  border-left: 3px solid #2563EB;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin-top: 12px;
  margin-bottom: 4px;
}

.ap-guide-tip__icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ap-guide-tip__text {
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.55;
}

.ap-guide-tip__text strong {
  color: #1E3A8A;
}

/* ============== HOW TO START (landing section) ============== */

.how-start {
  padding: 80px 0;
  background: linear-gradient(180deg, #F8FAFC 0%, #fff 100%);
}

.how-start__inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

.how-start__head {
  text-align: center;
  margin-bottom: 52px;
}

.how-start__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563EB;
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.how-start__title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #1E3A8A;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.how-start__sub {
  font-size: 1rem;
  color: #64748B;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.how-start__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}

.how-start__connector {
  display: none;
}

@media (min-width: 769px) {
  .how-start__connector {
    display: block;
    position: absolute;
    top: 34px;
    left: calc(12.5% + 10px);
    right: calc(12.5% + 10px);
    height: 2px;
    background: linear-gradient(90deg, rgba(37,99,235,0.3) 0%, rgba(16,185,129,0.3) 100%);
    z-index: 0;
    pointer-events: none;
  }
}

.how-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.how-step__num-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.how-step__num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.28);
}

.how-step__icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 10px;
  line-height: 1;
}

.how-step__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E3A8A;
  margin-bottom: 6px;
  line-height: 1.3;
}

.how-step__desc {
  font-size: 0.83rem;
  color: #64748B;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .how-start__grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
}

@media (max-width: 480px) {
  .how-start__grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
    gap: 24px;
  }
}
