/* =======================
   BOX CARTOMANTI - STILI
   ======================= */

/* STATO: ONLINE (Disponibile) */
.stato-disponibile {
    background-color: rgba(0, 255, 102, 0.07);
    border: 3px solid #00cc55;
    color: #00cc55;
}
.stato-disponibile strong { color: #00cc55; }

/* STATO: OCCUPATO (Al telefono) */
.stato-occupata {
    background-color: rgba(255, 0, 0, 0.07);
    border: 3px solid #cc0000;
    color: #cc0000;
}
.stato-occupata strong { color: #cc0000; }

/* STATO: IN PAUSA */
.stato-pausa {
    background-color: rgba(0, 170, 255, 0.07);
    border: 3px solid #00aaff;
    color: #00aaff;
}
.stato-pausa strong { color: #00aaff; }

/* STATO: OFFLINE */
.stato-offline {
    background-color: rgba(136, 136, 136, 0.07);
    border: 3px solid #888888;
    color: #888888;
}
.stato-offline strong { color: #888888; }

/* STATO: IN ATTESA */
.stato-inattesa {
    background-color: rgba(255, 165, 0, 0.07);
    border: 3px solid #ffa500;
    color: #ffa500;
}
.stato-inattesa strong { color: #ffa500; }

/* BOX GENERALE */
.box-cartomante {
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #111;
    color: #fff;
}

/* IMMAGINE (desktop: card verticale) */
.box-cartomante img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: cover;
}

/* NOME E CODICE */
.box-cartomante strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: inherit;
}

/* ETICHETTA STATO */
.stato-label {
    display: block;
    font-weight: bold;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: inherit;
}

/* MINUTI */
.box-cartomante small {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: inherit;
}

/* GRIGLIA */
.griglia-cartomanti {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    transition: opacity 0.4s ease;
}

.griglia-cartomanti.refreshing {
    opacity: 0.3;
}

/* =======================
   MOBILE ORIZZONTALE
   ======================= */
@media (max-width: 768px) {
  .griglia-cartomanti {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  .box-cartomante {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }

  .box-cartomante img {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 !important;
    flex: 0 0 72px !important;
    display: block !important;
  }

  .box-cartomante .box-meta {
    display: block !important;
    line-height: 1.15 !important;
    flex: 1 1 auto !important;
  }

  .box-cartomante strong {
    font-size: 1.15rem !important;
    margin: 0 0 2px 0 !important;
  }

  .stato-label {
    font-size: 0.95rem !important;
    margin-top: 0 !important;
  }

  .box-cartomante small {
    font-size: 0.85rem !important;
    margin-top: 2px !important;
  }

  .stato-disponibile {
    background-color: rgba(0,255,102,0.07) !important;
    border-color: #00cc55 !important;
    color: #00cc55 !important;
  }
  .stato-disponibile strong { color: #00cc55 !important; }

  .stato-occupata {
    background-color: rgba(255,0,0,0.07) !important;
    border-color: #cc0000 !important;
    color: #cc0000 !important;
  }
  .stato-occupata strong { color: #cc0000 !important; }

  .stato-pausa {
    background-color: rgba(0,170,255,0.07) !important;
    border-color: #00aaff !important;
    color: #00aaff !important;
  }
  .stato-pausa strong { color: #00aaff !important; }

  .stato-offline {
    background-color: rgba(136,136,136,0.07) !important;
    border-color: #888888 !important;
    color: #888888 !important;
  }
  .stato-offline strong { color: #888888 !important; }

  .stato-inattesa {
    background-color: rgba(255,165,0,0.07) !important;
    border-color: #ffa500 !important;
    color: #ffa500 !important;
  }
  .stato-inattesa strong { color: #ffa500 !important; }
}

/* super-small */
@media (max-width: 380px) {
  .box-cartomante img {
    width: 64px !important;
    height: 64px !important;
    flex-basis: 64px !important;
  }
}