/**
 * ep_onboarding.css
 * School Finder onboarding modal — EduProfiler Drupal 10 module
 */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Overlay backdrop ─────────────────────────────────────── */
#ep-onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 20, 40, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: ep-fade-in 0.35s ease both;
  /* Hidden by default until JS confirms it should show */
  visibility: hidden;
  opacity: 0;
}

#ep-onboarding-overlay.ep-ready {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s ease;
}

#ep-onboarding-overlay.ep-hiding {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@keyframes ep-fade-in  { from { opacity: 0 } to { opacity: 1 } }

/* ── Modal card ───────────────────────────────────────────── */
.ep-modal {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  position: relative;
  animation: ep-slide-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-play-state: paused;
}

#ep-onboarding-overlay.ep-ready .ep-modal {
  animation-play-state: running;
}

@keyframes ep-slide-up {
  from { opacity: 0; transform: translateY(28px) scale(0.97) }
  to   { opacity: 1; transform: translateY(0) scale(1) }
}

/* ── Brand header strip ───────────────────────────────────── */
.ep-brand-bar {
  background: #4985a7;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ep-logo-text {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  color: #ffffff;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.ep-logo-icon {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.15);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ep-close-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.8);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s;
  flex-shrink: 0;
}
.ep-close-btn:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ── Progress bar ─────────────────────────────────────────── */
.ep-progress-track {
  height: 3px;
  background: #e8eef6;
  position: relative;
  overflow: hidden;
}

.ep-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a6ec7, #2196f3);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Step dots ────────────────────────────────────────────── */
.ep-step-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 14px 0 0;
}

.ep-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dce4f0;
  transition: all 0.3s ease;
}
.ep-dot.ep-dot-done   { background: #1D9E75; }
.ep-dot.ep-dot-active { background: #1a6ec7; width: 22px; border-radius: 4px; }

/* ── Body padding ─────────────────────────────────────────── */
.ep-body {
  padding: 0 28px 24px;
  min-height: 340px;
  max-height: 75vh;
  overflow-y: scroll;
  position: relative;
}

/* ── Screen panels ────────────────────────────────────────── */
.ep-screen {
  display: none;
  flex-direction: column;
}
.ep-screen.ep-active {
  display: flex;
  animation: ep-screen-in 0.35s ease both;
}
.ep-screen.ep-back {
  animation: ep-screen-back 0.35s ease both;
}

@keyframes ep-screen-in {

  from {

    opacity: 0;

    transform: translateX(60px);

  }

  to {

    opacity: 1;

    transform: translateX(0);

  }

}
@keyframes ep-screen-back { from { opacity: 0; transform: translateX(-18px) } to { opacity: 1; transform: translateX(0) } }

/* ── Step pill label ──────────────────────────────────────── */
.ep-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #1a6ec7;
  background: #e8f1fb;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 18px 0 10px;
  width: fit-content;
}

/* ── Step typography ──────────────────────────────────────── */
.ep-step-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #0d1f3c;
  line-height: 1.25;
  margin-bottom: 6px;
}

.ep-step-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: #5a6a80;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* ── Mock UI panel ────────────────────────────────────────── */
.ep-mockup {
  background: #f4f7fc;
  border: 1px solid #dce4f0;
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.ep-mock-row { margin-bottom: 12px; }
.ep-mock-row:last-child { margin-bottom: 0; }

.ep-mock-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #7a8ea8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.ep-mock-field {
  background: #ffffff;
  border: 1px solid #d0daea;
  border-radius: 7px;
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #2a3a50;
}

.ep-mock-field.ep-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 13px;
  background: #1a6ec7;
  margin-left: 2px;
  animation: ep-blink 0.75s step-end infinite;
  vertical-align: middle;
}

@keyframes ep-blink { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }

/* ── Mock select field ────────────────────────────────────── */
.ep-mock-field.ep-mock-select {
  padding: 0 10px 0 12px;
  position: relative;
}

.ep-select {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #2a3a50;
  appearance: none;
  -webkit-appearance: none;
  cursor: default;
  outline: none;
  padding: 0;
  pointer-events: none;
}

.ep-select-arrow {
  flex-shrink: 0;
  color: #7a8ea8;
}

/* ── Mock text input field ────────────────────────────────── */
.ep-mock-field.ep-mock-text-input {
  padding: 0 12px;
}

.ep-text-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #9aadbe;
  outline: none;
  pointer-events: none;
  width: 100%;
}

.ep-text-input::placeholder {
  color: #b0bfcc;
  font-style: italic;
}

/* ── Chips ────────────────────────────────────────────────── */
.ep-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ep-chip {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #d0daea;
  color: #5a6a80;
  background: #ffffff;
  cursor: default;
  user-select: none;
}

.ep-chip.ep-sel {
  background: #e8f1fb;
  border-color: #1a6ec7;
  color: #1a6ec7;
}

/* ── 2-col grid ───────────────────────────────────────────── */
.ep-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Fake search button ───────────────────────────────────── */
.ep-fake-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4985a7;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: default;
  user-select: none;
}

/* ── Result cards ─────────────────────────────────────────── */
.ep-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.ep-rcard {
  background: #ffffff;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ep-rcard.ep-show       { opacity: 1; transform: translateY(0); }
.ep-rcard.ep-comparing  { border-color: #1a6ec7; background: #f5f9ff; }

.ep-rcard-name {
  font-size: 13px;
  font-weight: 600;
  color: #0d1f3c;
  margin-bottom: 2px;
}
.ep-rcard-meta {
  font-size: 11px;
  color: #7a8ea8;
  margin-bottom: 9px;
}

/* ── Compare toggle ───────────────────────────────────────── */
.ep-cmp-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: #7a8ea8;
}
.ep-cmp-box {
  width: 14px;
  height: 14px;
  border: 1.5px solid #c0cfe0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ep-cmp-toggle.ep-checked             { color: #1a6ec7; }
.ep-cmp-toggle.ep-checked .ep-cmp-box { background: #1a6ec7; border-color: #1a6ec7; }
.ep-cmp-toggle.ep-checked .ep-cmp-box::after {
  content: '';
  width: 7px;
  height: 4.5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -0.5px);
  display: block;
}

/* ── Comparison table section ─────────────────────────────── */
.ep-cmp-section {
  border-top: 1px solid #dce4f0;
  padding-top: 12px;
}
.ep-cmp-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8ea8;
  margin-bottom: 8px;
}
.ep-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
}
.ep-cmp-table th {
  text-align: left;
  padding: 5px 8px;
  color:#000000;
  font-weight: 600;
  border-bottom: 1px solid #e4ecf5;
}
.ep-cmp-table td {
  padding: 5px 8px;
  color: #1a2a40;
  border-bottom: 1px solid #f0f4fa;
}
.ep-cmp-table tr:last-child td { border-bottom: none; }
.ep-cmp-table td:first-child    { color: #7a8ea8; }

.ep-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.ep-badge-green { background: #e4f4e8; color: #1e7a38; }
.ep-badge-amber { background: #fdf0dc; color: #8a5a10; }

/* ── Welcome screen ───────────────────────────────────────── */
.ep-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px 32px;
  gap: 10px;
}

.ep-welcome-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1a6ec7 0%, #4985a7 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 8px 24px rgba(26, 110, 199, 0.3);
}

.ep-welcome-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: #0d1f3c;
  line-height: 1.2;
  margin: 0;
}
.ep-welcome-title em {
  font-style: italic;
  color: #1a6ec7;
}

.ep-welcome-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #5a6a80;
  line-height: 1.65;
  max-width: 340px;
  margin: 0;
}

.ep-feature-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 4px 0;
}
.ep-feat-pill {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #1a6ec7;
  background: #e8f1fb;
  padding: 5px 13px;
  border-radius: 20px;
}

/* ── Done screen ──────────────────────────────────────────── */
.ep-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px 32px;
  gap: 10px;
}
.ep-done-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1D9E75, #0f6e56);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 8px 24px rgba(29, 158, 117, 0.3);
}

/* ── Nav row ──────────────────────────────────────────────── */
.ep-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}
.ep-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.ep-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 8px;
  border: 1px solid #d0daea;
  background: transparent;
  color: #5a6a80;
  cursor: pointer;
  transition: all 0.15s;
}
.ep-btn:hover { background: #f4f7fc; color: #2a3a50; }

.ep-btn-primary {
  background: #4985a7;
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(15, 76, 138, 0.25);
}
.ep-btn-primary:hover { background: #1a6ec7; box-shadow: 0 4px 14px rgba(26, 110, 199, 0.3); }
.ep-btn-primary:active { transform: scale(0.98); }

.ep-btn-start {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  background: #4985a7;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(15, 76, 138, 0.28);
  transition: all 0.15s;
}
.ep-btn-start:hover {
  background: #1a6ec7;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26, 110, 199, 0.32);
}
.ep-btn-start:active { transform: translateY(0) scale(0.98); }

.ep-btn-done {
  background: #1D9E75;
  box-shadow: 0 4px 14px rgba(29, 158, 117, 0.28);
}
.ep-btn-done:hover { background: #0f8060; }

.ep-skip {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #9aadbe;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color 0.15s;
}
.ep-skip:hover { color: #5a6a80; }

/* ── Animated mock cursor ─────────────────────────────────── */
.ep-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #1a6ec7;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(26, 110, 199, 0.4);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              top  0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s;
}
.ep-cursor.ep-cv { opacity: 1; }

#ep-basic-criteria-input {
    border: 0px;
    background: transparent;
    padding: 0px;
}
input.search-schools-input {
    min-height: 35px;    
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 520px) {
  .ep-modal                { border-radius: 14px; }
  .ep-body                 { padding: 0 18px 20px; }
  .ep-step-title           { font-size: 19px; }
  .ep-welcome-title        { font-size: 21px; }
  .ep-results-grid,
  .ep-grid2                { grid-template-columns: 1fr; }
  .ep-feature-pills        { flex-direction: column; align-items: center; }
}