/* ══════════════════════════════════
   Mentor Cards — rendered in messages div
   ══════════════════════════════════ */

.cards-section {
  width: 100%;
  padding: 4px 0 8px;
}

/* Grid: JS sets --card-cols via gridTemplateColumns inline.
   On narrow screens collapse to 2 then 1 column. */
.cards-grid {
  display: grid;
  gap: 12px;
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 360px) {
  .cards-grid { grid-template-columns: 1fr !important; }
}

/* ── Card ── */
.mentor-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}

.mentor-card:hover {
  border-color: rgba(84, 128, 241, .50);
  box-shadow: 0 4px 28px rgba(82, 12, 244, .20);
  transform: translateY(-2px);
}

/* Gradient top bar */
.card-top-bar {
  height: 3px;
  background: var(--grad-btn);
  flex-shrink: 0;
}

/* All content below the bar has padding */
.card-header,
.card-industries,
.card-location,
.card-preview,
.card-why,
.card-footer {
  padding-inline: 16px;
}

/* ── Card header with avatar ── */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
}

.card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-user);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.5px;
}

.card-header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mentor-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mentor-title {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mentor-company {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Industry pills ── */
.card-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.industry-tag {
  font-size: 10px;
  font-weight: 600;
  background: rgba(84, 128, 241, .12);
  color: var(--blue);
  border: 1px solid rgba(84, 128, 241, .25);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ── Location ── */
.card-location {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Preview ── */
.card-preview {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* ── Why-match pills ── */
.card-why {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.why-tag {
  font-size: 10px;
  background: rgba(99, 215, 251, .08);
  color: var(--cyan);
  border: 1px solid rgba(99, 215, 251, .18);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

/* ── Footer ── */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* LinkedIn as a styled button */
.card-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--blue);
  border: 1px solid rgba(84, 128, 241, .35);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-linkedin:hover {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}

/* Request Match button */
.select-mentor-btn {
  padding: 6px 14px;
  background: var(--grad-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(82, 12, 244, .35);
  flex-shrink: 0;
}

.select-mentor-btn:hover { opacity: .88; }

.select-mentor-btn.selected {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 2px 10px rgba(22, 163, 74, .35);
  cursor: default;
}

/* ── Done Screen ── */
.done-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 24px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--glow);
}

.done-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
}

.done-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 340px;
  line-height: 1.7;
}
