/* M3 Candidati: form ricerca, tabella candidati, scheda profilo, box valutazione.
   Usa i token --hi-az-* da hi-az-tokens.css; nessun colore hardcoded. */

.hi-az-cand-search__filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.hi-az-cand-search__filters label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    gap: 4px;
}
.hi-az-cand-search__filters input,
.hi-az-cand-search__filters select {
    width: 100%;
}

.hi-az-cand-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.hi-az-cand-table th,
.hi-az-cand-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--hi-az-border, #e0e0e0);
    text-align: left;
    vertical-align: middle;
}
.hi-az-cand-table thead th {
    color: var(--hi-az-brand);
    border-bottom: 2px solid var(--hi-az-brand);
}
.hi-az-cand-table tbody tr:hover {
    background: var(--hi-az-surface-hover, #fafafa);
}

.hi-az-cand-profile {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.hi-az-cand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.hi-az-cand-profile__cell label {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}
.hi-az-cand-profile__cell p {
    margin: 0;
}
/* Solo i TITOLI (label) in grassetto, NON i valori. */
.hi-az-cand-profile__cell p { font-weight: 400; }
.hi-az-cand-profile__esperienza {
    border-bottom: 1px solid var(--hi-az-border, #e0e0e0);
    padding-bottom: 12px;
    margin-bottom: 12px;
}
/* (Rimossi i bordi/strisce rosse legacy su "Informazioni sulla condizione" e "Valutazione".) */
.hi-az-cand-profile__eval form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
}
.hi-az-cand-profile__eval label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
}
.hi-az-cand-profile__cv .hi-az-btn {
    display: inline-block;
}
.hi-az-notice--ok {
    color: var(--hi-az-success, #2e7d32);
}

/* ---- Riga candidato stile "members datatable" Metronic (avatar / stelle / preferito) ---- */
.hi-az-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}
.hi-az-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
}
.hi-az-stars .ki-star {
    color: #8b91a3; /* outline vuoto: grigio più marcato (linee nette) */
}
.hi-az-stars .ki-star.is-on {
    color: #f6b100;
}
.hi-az-heart {
    font-size: 1.05rem;
    color: #8b91a3; /* outline vuoto più marcato */
}
.hi-az-heart.is-on {
    color: var(--primary, #c20e1a);
}

/* ---- Scheda candidato stile public-profile (hero + tab) ---- */
.hi-az-cand-hero .hi-az-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
}
/* Badge formazione (es. "Diploma: 2000") nell'hero: un po' più di respiro sopra. */
.hi-az-cand-hero .kt-badge {
  padding-top: 4px;
  padding-bottom: 4px;
}
/* "Altre informazioni sulla condizione": testo sorgente in MAIUSCOLO → mostrato
   in minuscolo con la sola iniziale maiuscola (solo visuale, il dato resta invariato). */
.hi-az-sentence {
  text-transform: lowercase;
}
.hi-az-sentence::first-letter {
  text-transform: uppercase;
}
.hi-az-cand-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border, #e4e6ef);
  margin-bottom: 1.25rem;
}
.hi-az-cand-tabs__btn {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--secondary-foreground, #4b5675);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.hi-az-cand-tabs__btn:hover { color: var(--mono, #071437); }
.hi-az-cand-tabs__btn.is-active {
  color: var(--primary, #c20e1a);
  border-bottom-color: var(--primary, #c20e1a);
}
.hi-az-cand-tabs__panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ---- Avatar foto profilo (se caricata) ---- */
.hi-az-avatar--photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---- Box valutazione scheda: stelle + cuore cliccabili + note grande ---- */
.hi-az-eval-stars {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1.6rem;
}
.hi-az-eval-stars .ki-star { color: #8b91a3; cursor: pointer; }
.hi-az-eval-stars .ki-star.is-on { color: #f6b100; }
.hi-az-eval-clear { background: none; border: 0; cursor: pointer; }
.hi-az-eval-heart-btn {
  width: max-content;
  border: 1px solid var(--border, #e4e6ef);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  background: var(--background, #fff);
  cursor: pointer;
}
.hi-az-eval-heart { font-size: 1.25rem; color: #8b91a3; }
.hi-az-eval-heart.is-on { color: var(--primary, #c20e1a); }
.hi-az-eval-note {
  width: 100%;
  min-height: 170px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--input, #dbdfe9);
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ---- Modale foto profilo a schermo intero ---- */
.hi-az-photo-trigger { padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
.hi-az-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 2rem;
}
.hi-az-photo-modal[hidden] { display: none; }
.hi-az-photo-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.hi-az-photo-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.hi-az-photo-modal__close:hover { background: rgba(255, 255, 255, 0.3); }

/* Badge formazione: tronca le stringhe lunghe, testo completo nel tooltip (title). */
.hi-az-badge--trunc { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; cursor: help; }
@media (max-width: 768px) { .hi-az-badge--trunc { max-width: 180px; } }

/* Ricerca candidati / preferiti: campi tutti alla stessa altezza e, su mobile, uno sotto l'altro
   (la griglia era grid-cols-3 fissa → 3 per riga anche su smartphone, stretta). */
.hi-az-cand-search__form .kt-input,
.hi-az-cand-search__form .kt-select {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
}
.hi-az-cand-search__form .grid {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .hi-az-cand-search__form .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
