/* =============================================================
   Eagle Tape Finder — Front-end Styles
   Scoped entirely under .eagle-tape-finder-wrap to avoid
   collisions with the host theme.
   Version: 1.0.0
   ============================================================= */

/* ---- CSS Custom Properties ---------------------------------- */
.eagle-tape-finder-wrap {
  --etf-gold:        #BA7517;
  --etf-navy:        #0D2137;
  --etf-bg:          #F7F4EE;
  --etf-card-border: #E2D9C8;
  --etf-white:       #FFFFFF;
  --etf-green:       #2E7D32;
  --etf-text:        #1A1A1A;
  --etf-text-muted:  #555E6A;
  --etf-gold-light:  #FFF8EE;
  --etf-navy-light:  #EEF2F7;
  --etf-green-light: #EDF7EE;
  --etf-radius:      10px;
  --etf-shadow:      0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ---- Step fade-in animation --------------------------------- */
@keyframes etfFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Container ---------------------------------------------- */
.eagle-tape-finder-wrap {
  max-width: 1020px;
  margin: 64px auto 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--etf-text);
  background: var(--etf-bg);
  border-radius: 16px;
  padding: 60px 68px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.eagle-tape-finder-wrap *,
.eagle-tape-finder-wrap *::before,
.eagle-tape-finder-wrap *::after {
  box-sizing: inherit;
}

/* ---- Header ------------------------------------------------- */
.etf-header {
  text-align: center;
  margin-bottom: 32px;
}

.etf-headline {
  color: var(--etf-navy);
  font-size: 2.1rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}

.etf-subheadline {
  color: var(--etf-text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ---- Progress bar ------------------------------------------- */
.etf-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  transition: opacity 0.3s ease;
}

.etf-progress-wrap.etf-progress-hidden {
  display: none;
}

.etf-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--etf-card-border);
  border-radius: 3px;
  overflow: hidden;
}

.etf-progress-fill {
  height: 100%;
  background: var(--etf-gold);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

.etf-progress-label {
  font-size: 0.8rem;
  color: var(--etf-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Steps -------------------------------------------------- */
.etf-step {
  display: none;
}

.etf-step.etf-step--active {
  display: block;
  animation: etfFadeIn 0.35s ease forwards;
}

/* ---- Step header -------------------------------------------- */
.etf-step-header {
  margin-bottom: 24px;
}

.etf-step-number {
  font-size: 0.75rem;
  color: var(--etf-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.etf-step-title {
  font-size: 1.6rem;
  color: var(--etf-navy);
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.3;
}

.etf-step-subtitle {
  color: var(--etf-text-muted);
  font-size: 1.05rem;
  margin: 0 0 28px;
  line-height: 1.6;
}

/* ---- Quickstart buttons (Step 0) ---------------------------- */
.etf-quickstart-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 580px;
  margin: 0 auto;
}

.etf-qs-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px 28px;
  border-radius: var(--etf-radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 52px;
  line-height: 1.4;
}

.etf-qs-btn--primary {
  background: var(--etf-gold);
  color: var(--etf-white);
  border-color: var(--etf-gold);
}

.etf-qs-btn--primary:hover,
.etf-qs-btn--primary:focus-visible {
  background: #9e6213;
  border-color: #9e6213;
  outline: none;
}

.etf-qs-btn--secondary {
  background: var(--etf-white);
  color: var(--etf-navy);
  border-color: var(--etf-card-border);
}

.etf-qs-btn--secondary:hover,
.etf-qs-btn--secondary:focus-visible {
  border-color: var(--etf-gold);
  box-shadow: 0 2px 8px rgba(186, 117, 23, 0.12);
  outline: none;
}

.etf-qs-desc {
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.85;
  margin-top: 6px;
  line-height: 1.4;
}

/* ---- Options grid ------------------------------------------- */
.etf-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

/* ---- Option cards ------------------------------------------- */
.etf-option-card {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  background: var(--etf-white);
  border: 2px solid var(--etf-card-border);
  border-radius: var(--etf-radius);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 48px;
  user-select: none;
}

.etf-option-card:hover {
  border-color: var(--etf-gold);
  box-shadow: 0 2px 8px rgba(186, 117, 23, 0.15);
}

.etf-option-card:focus-visible {
  outline: 2px solid var(--etf-gold);
  outline-offset: 2px;
}

.etf-option-card.selected {
  border-color: var(--etf-gold);
  border-left-width: 4px;
  background: var(--etf-gold-light);
  box-shadow: 0 2px 8px rgba(186, 117, 23, 0.18);
}

.etf-option-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
  line-height: 1;
}

.etf-option-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--etf-navy);
  line-height: 1.35;
}

.etf-option-desc {
  font-size: 0.9rem;
  color: var(--etf-text-muted);
  margin-top: 5px;
  line-height: 1.45;
}

/* ---- Callout box -------------------------------------------- */
.etf-callout {
  background: var(--etf-white);
  border-left: 3px solid var(--etf-gold);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--etf-text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.etf-callout strong {
  color: var(--etf-text);
}

/* ---- Step navigation ---------------------------------------- */
.etf-step-nav {
  margin-top: 8px;
}

.etf-btn-back {
  background: transparent;
  border: none;
  color: var(--etf-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 0;
  transition: color 0.15s ease;
  font-family: inherit;
}

.etf-btn-back:hover,
.etf-btn-back:focus-visible {
  color: var(--etf-navy);
  outline: none;
}

/* ---- Results step ------------------------------------------- */
.etf-results-step {
  /* Inherits display:none / display:block from .etf-step rules */
}

.etf-results-inner {
  /* Container filled entirely by JS */
}

.etf-results-summary {
  font-size: 1.15rem;
  color: var(--etf-text-muted);
  margin-bottom: 32px;
  text-align: center;
  line-height: 1.65;
}

/* ---- Result cards ------------------------------------------- */
.etf-result-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.etf-result-card {
  background: var(--etf-white);
  border: 1px solid var(--etf-card-border);
  border-radius: var(--etf-radius);
  padding: 32px 36px;
  box-shadow: var(--etf-shadow);
  border-top: 4px solid var(--etf-card-border);
}

.etf-result-card.etf-card--tape {
  border-top-color: var(--etf-gold);
}

.etf-result-card.etf-card--machine {
  border-top-color: var(--etf-navy);
}

.etf-result-card.etf-card--print {
  border-top-color: var(--etf-green);
}

.etf-result-card.etf-card--print-primary {
  border-top-color: var(--etf-gold);
}

.etf-card-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--etf-text-muted);
  margin-bottom: 8px;
}

.etf-result-card h4 {
  font-size: 1.4rem;
  color: var(--etf-navy);
  margin: 0 0 14px;
  font-weight: 700;
  line-height: 1.25;
}

.etf-result-card p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--etf-text);
  margin: 0 0 16px;
}

.etf-result-card p:last-child {
  margin-bottom: 0;
}

.etf-print-note {
  color: var(--etf-text-muted) !important;
  font-size: 0.85rem !important;
}

/* ---- Tags --------------------------------------------------- */
.etf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.etf-tag {
  display: inline-flex;
  align-items: center;
  background: var(--etf-green-light);
  color: var(--etf-green);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ---- Good to know box --------------------------------------- */
.etf-good-to-know {
  background: var(--etf-bg);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--etf-text-muted);
  margin-top: 8px;
  line-height: 1.65;
}

/* ---- CTA section -------------------------------------------- */
.etf-cta-section {
  text-align: center;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--etf-card-border);
}

.etf-btn-primary {
  background: var(--etf-gold);
  color: var(--etf-white);
  border: none;
  border-radius: 8px;
  padding: 17px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  min-height: 52px;
  font-family: inherit;
  line-height: 1.3;
}

.etf-btn-primary:hover,
.etf-btn-primary:focus-visible {
  background: #9e6213;
  box-shadow: 0 4px 16px rgba(186, 117, 23, 0.3);
  outline: none;
}

.etf-cta-reassurance {
  font-size: 0.82rem;
  color: var(--etf-text-muted);
  margin-top: 10px;
  margin-bottom: 0;
}

.etf-btn-reset {
  background: transparent;
  border: none;
  color: var(--etf-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 12px;
  text-decoration: underline;
  font-family: inherit;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.etf-btn-reset:hover,
.etf-btn-reset:focus-visible {
  color: var(--etf-navy);
  outline: none;
}

/* ---- Spec mode note ----------------------------------------- */
.etf-spec-mode-note {
  background: var(--etf-navy-light);
  border-left: 3px solid var(--etf-navy);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--etf-navy);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---- Brand pre-select note ---------------------------------- */
.etf-brand-preselect-note {
  background: var(--etf-gold-light);
  border-left: 3px solid var(--etf-gold);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #7a4c0d;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ---- Mobile / responsive ------------------------------------ */
@media (max-width: 768px) {
  .eagle-tape-finder-wrap {
    margin-top: 40px;
    padding: 32px 24px;
    border-radius: 12px;
    font-size: 16px;
  }

  .etf-headline {
    font-size: 1.55rem;
  }

  .etf-subheadline {
    font-size: 1rem;
  }

  .etf-step-title {
    font-size: 1.3rem;
  }

  .etf-step-subtitle {
    font-size: 0.975rem;
  }

  .etf-options-grid {
    grid-template-columns: 1fr;
  }

  .etf-quickstart-btns {
    max-width: 100%;
  }

  .etf-result-card {
    padding: 22px 22px;
  }

  .etf-result-card h4 {
    font-size: 1.2rem;
  }

  .etf-result-card p {
    font-size: 0.975rem;
  }

  .etf-btn-primary {
    width: 100%;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .eagle-tape-finder-wrap {
    padding: 20px 14px;
  }

  .etf-headline {
    font-size: 1.3rem;
  }

  .etf-qs-btn {
    padding: 16px 18px;
  }
}
