/* STATO: ONLINE (Disponibile) */
.stato-disponibile {
    background-color: rgba(0, 255, 102, 0.07);
    border: 3px solid #00cc55;
    color: #00cc55;
}

/* STATO: OCCUPATO (Al telefono) */
.stato-occupata {
    background-color: rgba(255, 0, 0, 0.07);
    border: 3px solid #cc0000;
    color: #cc0000;
}

/* STATO: IN PAUSA */
.stato-pausa {
    background-color: rgba(0, 170, 255, 0.07);
    border: 3px solid #00aaff;
    color: #00aaff;
}

/* STATO: OFFLINE */
.stato-offline {
    background-color: rgba(136, 136, 136, 0.07);
    border: 3px solid #888888;
    color: #888888;
}

/* STATO: IN ATTESA */
.stato-inattesa {
    background-color: rgba(255, 165, 0, 0.07);
    border: 3px solid #ffa500;
    color: #ffa500;
}

/* BOX GENERALE */
.box-cartomante {
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #111;
    color: white;
}

/* IMMAGINE */
.box-cartomante img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* NOME E CODICE */
.box-cartomante strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: inherit;
    word-break: break-word;
}

/* ETICHETTA STATO */
.stato-label {
    display: block;
    font-weight: normal;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: inherit;
}

/* MINUTI */
.box-cartomante small {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: inherit;
}

/* GRIGLIA */
.griglia-cartomanti {
    transition: opacity 0.4s ease;
}

.griglia-cartomanti.refreshing {
    opacity: 0.3;
}

/* === MOBILE LAYOUT === */
@media (max-width: 768px) {
  /* Colori stato */
  .stato-disponibile,
  .stato-occupata,
  .stato-pausa,
  .stato-offline,
  .stato-inattesa {
    background-color: inherit !important;
    border-color: inherit !important;
    color: inherit !important;
  }

  .stato-disponibile {
    background-color: rgba(0, 255, 102, 0.07) !important;
    border-color: #00cc55 !important;
    color: #00cc55 !important;
  }

  .stato-occupata {
    background-color: rgba(255, 0, 0, 0.07) !important;
    border-color: #cc0000 !important;
    color: #cc0000 !important;
  }

  .stato-pausa {
    background-color: rgba(0, 170, 255, 0.07) !important;
    border-color: #00aaff !important;
    color: #00aaff !important;
  }

  .stato-offline {
    background-color: rgba(136, 136, 136, 0.07) !important;
    border-color: #888888 !important;
    color: #888888 !important;
  }

  .stato-inattesa {
    background-color: rgba(255, 165, 0, 0.07) !important;
    border-color: #ffa500 !important;
    color: #ffa500 !important;
  }

  /* Layout griglia mobile */
  .griglia-cartomanti {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .box-cartomante {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px !important;
    margin: 0 !important;
  }

  .box-cartomante img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 8px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  /* Riduzione font per evitare overflow colonne */
  .box-cartomante strong {
    font-size: 1rem !important;
  }

  .stato-label {
    font-size: 0.95rem !important;
  }

  .box-cartomante small {
    font-size: 0.75rem !important;
  }
}



/* Evidenzia i box con link attivo */
.griglia-cartomanti.linkata .box-cartomante {
    background-color: #1a1a1a;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Approccio più aggressivo con maggiore specificità */
.griglia-cartomanti.linkata .box-cartomante strong a,
.griglia-cartomanti.linkata .box-cartomante a strong,
.griglia-cartomanti.linkata .box-cartomante a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.griglia-cartomanti.linkata .box-cartomante strong a:hover,
.griglia-cartomanti.linkata .box-cartomante a strong:hover,
.griglia-cartomanti.linkata .box-cartomante a:hover {
    color: #C0C0C0 !important;
    text-decoration: underline !important;
}


/* Contenitore verticale pulsanti */
.pulsanti-operatrice {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Forza i pulsanti a essere blocchi separati */
.pulsanti-operatrice a {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Stile comune */
.btn-chiama,
.btn-bio {
    text-align: center;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 6px;
    color: #fff;
    transition: background 0.25s ease, transform 0.15s ease;
}

/* Variante: cellulare */
.btn-cellulare {
    background-color: #FC0303;
}
.btn-cellulare:hover {
    background-color: #b30202;
    transform: scale(1.02);
}

/* Variante: fisso */
.btn-fisso {
    background-color: #157E27;
}
.btn-fisso:hover {
    background-color: #0f5d1b;
    transform: scale(1.02);
}

/* Variante: bio */
.btn-bio {
    background-color: #444;
}
.btn-bio:hover {
    background-color: #2f2f2f;
    transform: scale(1.02);
}


.lista-operatrici-pillola {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.pillola-operatrice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #333;
    border-radius: 30px;
    padding: 10px 16px;
    color: #fff;
    background: #111;
    transition: background 0.3s ease;
    max-width: 400px;
    flex: 1 1 300px;
}

/* Intestazione */
.pillola-intestazione {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.pillola-intestazione strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
}

.codice-pillola,
.stato-pillola {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-left: 6px;
}

.icona-stato-svg {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Pulsanti */
.pillola-pulsanti {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pillola-pulsanti a {
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    color: #fff;
}

.btn-cellulare {
    background: #FC0303;
}
.btn-cellulare:hover {
    background: #b30202;
}

.btn-fisso {
    background: #157E27;
}
.btn-fisso:hover {
    background: #0f5d1b;
}

/* Responsive: stacking verticale */
@media (max-width: 600px) {
    .pillola-operatrice {
        flex-direction: column;
        align-items: flex-start;
    }

    .pillola-pulsanti {
        margin-top: 8px;
    }
}
