/* ============================================================================
 * step3_leg_picker.css — styles for the inline variant picker.
 * All classes scoped to .t2i-lp-* to avoid colliding with existing styles.
 * ============================================================================ */

.t2i-lp-chip-wrap {
  /* This block is a flex sibling (right column) of the statement card, not a
   * stacked block — so it must top-align with the card body. The old
   * margin-top/border-top (meant for a stacked layout) made the compare chip
   * float below the body's top. Reset them; .t2i-stmt-card aligns to flex-start.
   */
  margin-top: 0;
  padding-top: 0;
}

.t2i-lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 16px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid rgba(67, 56, 202, 0.15);
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}
.t2i-lp-chip:hover { background: #e0e7ff; }
.t2i-lp-chip.open .ti-chevron-down {
  transform: rotate(180deg);
  transition: transform 0.15s ease;
}
.t2i-lp-chip .ti { font-size: 14px; }

.t2i-lp-expanded {
  margin-top: 12px;
  padding: 14px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
}

.t2i-lp-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.t2i-lp-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}
.t2i-lp-card.selected {
  border: 2px solid #4338ca;
  padding: 11px 13px;
}
.t2i-lp-card-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.t2i-lp-card-ico.air { background: #dbeafe; color: #1e40af; }
.t2i-lp-card-ico.rail { background: #d1fae5; color: #065f46; }
.t2i-lp-card-ico.road { background: #f3f4f6; color: #4b5563; }
.t2i-lp-card-ico .ti-moon { color: #92400e; }
.t2i-lp-card-ico:has(.ti-moon) { background: #fef3c7; }

.t2i-lp-card-body {
  flex: 1;
  min-width: 0;
}
.t2i-lp-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.t2i-lp-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}
.t2i-lp-card-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  white-space: nowrap;
}
.t2i-lp-segments {
  font-size: 12px;
  color: #6b7280;
  margin: 4px 0 6px 0;
  line-height: 1.4;
}
.t2i-lp-stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #6b7280;
  flex-wrap: wrap;
}
.t2i-lp-stats strong {
  color: #111827;
  font-weight: 500;
}
.t2i-lp-why {
  font-size: 12px;
  color: #374151;
  margin-top: 6px;
  line-height: 1.4;
}
.t2i-lp-btn {
  flex-shrink: 0;
  align-self: center;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.t2i-lp-btn:hover:not(:disabled) {
  background: #f3f4f6;
}
.t2i-lp-btn.selected,
.t2i-lp-btn:disabled {
  background: #e0e7ff;
  color: #4338ca;
  border-color: #c7d2fe;
  cursor: default;
  opacity: 0.85;
}

.t2i-lp-feedback {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
  flex-wrap: wrap;
}
.t2i-lp-fb-btn {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.1);
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.t2i-lp-fb-btn:hover { background: #f3f4f6; color: #111827; }
.t2i-lp-fb-btn.active {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.t2i-lp-fb-btn .ti { font-size: 13px; }

.t2i-lp-comment-box {
  margin-top: 10px;
  padding: 10px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}
.t2i-lp-comment-box textarea {
  width: 100%;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.t2i-lp-comment-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}
.t2i-lp-comment-actions button {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
}
.t2i-lp-comment-actions button[data-action="comment_submit"] {
  background: #4338ca;
  color: #ffffff;
  border-color: #4338ca;
}
.t2i-lp-comment-thanks {
  font-size: 13px;
  color: #065f46;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------------------------------------------------------------------------
 * Recommendation strength hierarchy (#3) — make the recommended option dominate
 * and let weaker alternatives recede, without hiding them. Tiers are set by the
 * picker JS (_variantStrength): primary | good | optional.
 * ------------------------------------------------------------------------- */
/* "Optional" (e.g. a flight on a road/rail-recommended leg): visibly lighter. */
.t2i-lp-card.t2i-strength-optional {
  opacity: 0.7;
  background: #fcfcfd;
}
.t2i-lp-card.t2i-strength-optional .t2i-lp-card-title { font-weight: 400; }
.t2i-lp-card.t2i-strength-optional:hover { opacity: 1; }
/* "Good alternative": full strength but clearly secondary to the recommendation. */
.t2i-lp-card.t2i-strength-good .t2i-lp-card-title { font-weight: 500; }
/* The neutral tier tag ("Good alternative" / "Optional") reads quieter than the
 * indigo "Recommended" badge so the recommendation stays visually dominant. */
.t2i-lp-card-badge.t2i-strength-tag {
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 500;
}

@media (max-width: 600px) {
  .t2i-lp-card { flex-wrap: wrap; }
  .t2i-lp-btn { width: 100%; margin-top: 8px; }
  .t2i-lp-stats { font-size: 11px; gap: 10px; }
}
