/* Scoped styles for the SCA tracking page */
.sca-tracking-wrap {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

.sca-tracking-card {
  background: #0b0b0d;
  color: #f4f4f5;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.sca-tracking-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px 0;
  color: #ffffff;
}

.sca-tracking-sub {
  margin: 0 0 18px 0;
  color: rgba(244,244,245,0.85);
  font-size: 14px;
}

.sca-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 700;
}

/* keep tracking link readable inside the pill */
.sca-pill a {
  color: #93c5fd !important;
  text-decoration: none;
}
.sca-pill a:hover {
  text-decoration: underline;
}

/* ---------- Search UI: side-by-side with OR ---------- */
.sca-search {
  margin-bottom: 16px;
}

.sca-search-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .sca-search-row {
    grid-template-columns: 1fr;
  }
  .sca-search-or {
    display: none;
  }
}

.sca-search-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 14px;
}

.sca-search-title {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
}

.sca-search-or {
  display: grid;
  place-items: center;
  min-width: 44px;
}
.sca-search-or span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-weight: 900;
  letter-spacing: 0.06em;
}

/* Inputs */
.sca-field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.sca-field-row-3 {
  grid-template-columns: 1fr 1fr auto;
}

@media (max-width: 620px) {
  .sca-field-row,
  .sca-field-row-3 {
    grid-template-columns: 1fr;
  }
}

.sca-input {
  width: 100%;
  background: rgba(0,0,0,0.35) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}

.sca-input::placeholder {
  color: rgba(255,255,255,0.55) !important;
}

/* WooCommerce primary-style buttons (use WC class, but force readability) */
.sca-search .button,
.sca-search button.button {
  border-radius: 12px !important;
  font-weight: 900 !important;
  padding: 10px 14px !important;
  line-height: 1.1 !important;

  /* Force green regardless of theme variables (fixes #720eec / purple) */
  background: #00c2ff !important;
  background-color: #00c2ff !important;

  border: 0 !important;
  color: #07130a !important;
}

.sca-search .button:hover,
.sca-search button.button:hover {
  filter: brightness(1.05);
}

/* =========================================================
   Progress timeline (desktop = horizontal with green rail)
   ========================================================= */

.sca-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  align-items: start;
  margin: 18px 0 8px;
  padding: 10px 6px 0;

  /* progress amount */
  --sca-progress: 0%;

  /* force OUR primary for this component (prevents theme purple) */
  --wc-primary: #00c2ff;
}

/* Base rail (gray) */
.sca-progress::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 52px;               /* aligns with dot center */
  height: 4px;
  background: rgba(0,0,0,0.12);
  border-radius: 999px;
}

/* Filled rail (green / wc primary) */
.sca-progress::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 52px;
  height: 4px;
  width: var(--sca-progress);
  background: var(--wc-primary, #00c2ff);
  border-radius: 999px;
}

.sca-progress-step {
  position: relative;
  text-align: center;
  padding: 0 6px;
}

.sca-progress-icon {
  font-size: 20px;
  line-height: 1;
  margin: 0 auto 6px;
}

/* If emoji are rendered as <img> by WP */
.sca-progress-icon img.emoji {
  width: 18px !important;
  height: 18px !important;
  vertical-align: middle !important;
}

.sca-progress-label {
  font-weight: 800;
  font-size: 12px;
  line-height: 1.2;
  margin: 0 auto;
  color: #0b1220;
}

/* Dot */
.sca-progress-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 50px;               /* matches rail top + 2px */
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid rgba(0,0,0,0.18);
  z-index: 2;              /* above rails */
}

/* Done steps = filled */
.sca-progress-step.is-done .sca-progress-dot {
  background: var(--wc-primary, #00c2ff);
  border-color: var(--wc-primary, #00c2ff);
}

/* Current step = outlined + subtle glow */
.sca-progress-step.is-current .sca-progress-dot {
  background: #fff;
  border-color: var(--wc-primary, #00c2ff);
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.15);
}

/* Todo steps = muted label */
.sca-progress-step.is-todo .sca-progress-label {
  opacity: 0.55;
}

/* =========================================================
   Mobile: stacked steps with vertical rail
   ========================================================= */
@media (max-width: 640px) {
  .sca-progress {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 6px 8px 6px 34px; /* leave room for vertical rail + dots */
  }

  .sca-progress::before {
    left: 16px;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 4px;
    height: auto;
  }

  .sca-progress::after {
    left: 16px;
    top: 10px;
    bottom: auto;
    width: 4px;
    height: var(--sca-progress);
  }

  .sca-progress-step {
    text-align: left;
    padding: 0;
  }

  .sca-progress-dot {
    left: 16px;
    transform: translateX(-50%);
    top: 8px;
  }

  .sca-progress-icon {
    display: inline-block;
    margin: 0 8px 0 0;
  }

  .sca-progress-label {
    display: inline-block;
    font-size: 13px;
  }
}

/* ---------- Divider / History ---------- */
.sca-hr {
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 18px 0;
  border: 0;
}

.sca-history-title {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
}

.sca-history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.sca-history-item {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 14px;
  padding: 12px 14px;
  color: #f4f4f5 !important;
}

.sca-history-time {
  font-size: 12px;
  color: rgba(244,244,245,0.75) !important;
  font-weight: 800;
}

.sca-history-desc {
  font-size: 14px;
  color: #ffffff !important;
  font-weight: 800;
}

.sca-history-loc {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(244,244,245,0.75) !important;
}

.sca-error {
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fecaca !important;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
}

.sca-note {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(244,244,245,0.70) !important;
}

.sca-tracking-wrap a {
  color: #93c5fd !important;
  text-decoration: none;
}
.sca-tracking-wrap a:hover {
  text-decoration: underline;
}