/*
==========================================================
 Giocoscuola - Pannello Amministrazione
----------------------------------------------------------
 File........: admin.css
 Versione....: 1.0
==========================================================
*/


/*=========================================================
    COLORI
=========================================================*/

:root{

    --blu:#005a9c;

    --blu-chiaro:#eaf4ff;

    --azzurro:#2196f3;

    --arancione:#ff9800;

    --verde:#4caf50;

    --rosso:#e53935;

    --grigio:#666666;

    --bordo:#d6d6d6;

    --sfondo:#f3f6fb;

    --bianco:#ffffff;

}


/*=========================================================
    RESET
=========================================================*/

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}


body{

    background:var(--sfondo);

    font-family:Arial, Helvetica, sans-serif;

    font-size:15px;

    color:#333;

    line-height:1.5;

}

/*=========================================================
 CONTENITORE PRINCIPALE
=========================================================*/

.admin-container{

    max-width:1400px;

    margin:30px auto;

    padding:20px;

}

/*=========================================================
    TITOLI
=========================================================*/

h1{

    color:var(--blu);

    margin-bottom:10px;

}


h2{

    color:var(--blu);

    margin-bottom:15px;

    font-size:20px;

}


p{

    margin-bottom:12px;

}


/*=========================================================
    SEPARATORE
=========================================================*/

hr{

    border:none;

    border-top:1px solid var(--bordo);

    margin:20px 0;

}


/*=========================================================
 COLONNE
=========================================================*/

#colonne{

    display:grid;

    grid-template-columns:300px 300px 1fr;

    gap:20px;

    margin:25px 0;

}

@media (max-width:1100px){

    #colonne{

        grid-template-columns:1fr;

    }

}
/*=========================================================
 BOX
=========================================================*/

.box{

    background:#fff;

    border-radius:12px;

    border:1px solid #d9e2ec;

    padding:18px;

    box-shadow:0 2px 8px rgba(0,0,0,.08);

    height:100%;

}

.box h2{

    margin-top:0;

    color:#005baa;

    border-bottom:2px solid #e8eef6;

    padding-bottom:10px;

}

/*=========================================================
 LISTE
=========================================================*/

#listaGiochi,
#listaCategorie,
#listaFile{

    max-height:520px;

    overflow-y:auto;

}

/*=========================================================
    ELEMENTI DELLE LISTE
=========================================================*/

.gioco,
.categoria,
.file{

    padding:10px 12px;

    margin-bottom:6px;

    border-radius:6px;

    cursor:pointer;

    transition:all .20s ease;

    border:1px solid transparent;

}


/*=========================================================
    HOVER
=========================================================*/

.gioco:hover,
.categoria:hover,
.file:hover{

    background:var(--blu-chiaro);

    border-color:var(--azzurro);

}


/*=========================================================
    ELEMENTO SELEZIONATO
=========================================================*/

.selezionato{

    background:var(--azzurro);

    color:white;

    border-color:var(--blu);

    font-weight:bold;

}


.selezionato small{

    color:white;

}


/*=========================================================
    FILE
=========================================================*/

.file{

    line-height:1.4;

}


.file strong{

    display:block;

    margin-bottom:4px;

}


.file small{

    color:var(--grigio);

}


/*=========================================================
    SCROLLBAR
=========================================================*/

#listaGiochi::-webkit-scrollbar,
#listaCategorie::-webkit-scrollbar,
#listaFile::-webkit-scrollbar{

    width:10px;

}


#listaGiochi::-webkit-scrollbar-track,
#listaCategorie::-webkit-scrollbar-track,
#listaFile::-webkit-scrollbar-track{

    background:#eeeeee;

}


#listaGiochi::-webkit-scrollbar-thumb,
#listaCategorie::-webkit-scrollbar-thumb,
#listaFile::-webkit-scrollbar-thumb{

    background:var(--azzurro);

    border-radius:8px;

}


#listaGiochi::-webkit-scrollbar-thumb:hover,
#listaCategorie::-webkit-scrollbar-thumb:hover,
#listaFile::-webkit-scrollbar-thumb:hover{

    background:var(--blu);

}

/*=========================================================
 EDITOR
=========================================================*/

#editor{

    background:#fff;

    border-radius:12px;

    padding:20px;

    border:1px solid #d9e2ec;

    box-shadow:0 2px 8px rgba(0,0,0,.08);

}

#contenutoEditor{

    margin-top:20px;

    min-height:350px;

}

/*=========================================================
    TEXTAREA
=========================================================*/

#testoQuiz{

    width:100%;

    height:420px;

    padding:15px;

    border:1px solid var(--bordo);

    border-radius:8px;

    resize:vertical;

    font-family:Consolas, "Courier New", monospace;

    font-size:15px;

    line-height:1.5;

    background:#fcfcfc;

    outline:none;

}


#testoQuiz:focus{

    border-color:var(--azzurro);

    box-shadow:0 0 6px rgba(33,150,243,.35);

}


/*=========================================================
    ANTEPRIMA IMMAGINI
=========================================================*/

#contenutoEditor img{

    display:block;

    max-width:100%;

    max-height:600px;

    margin:auto;

    border:1px solid var(--bordo);

    border-radius:8px;

    box-shadow:0 2px 8px rgba(0,0,0,.12);

}

/*=========================================================
 PULSANTI
=========================================================*/

#pulsanti{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

    margin-top:25px;

}

#pulsanti button{

    padding:10px 18px;

    border:none;

    border-radius:8px;

    cursor:pointer;

    font-size:15px;

    transition:.20s;

}

#pulsanti button:hover{

    transform:translateY(-2px);

}


/*=========================================================
    COLORI PULSANTI
=========================================================*/

#salvaFile{

    background:var(--verde);

}


#salvaFile:hover{

    background:#43a047;

}


#eliminaFile{

    background:var(--rosso);

}


#eliminaFile:hover{

    background:#d32f2f;

}


#caricaFile{

    background:var(--arancione);

}


#caricaFile:hover{

    background:#fb8c00;

}
/*=========================================================
    RESPONSIVE
=========================================================*/

@media (max-width:1200px){

    #colonne{

        grid-template-columns:1fr;

    }

    .colonna,
    .colonna-file{

        min-height:auto;

    }

}


@media (max-width:768px){

    .admin-container{

        width:98%;

        padding:15px;

    }

    h1{

        font-size:26px;

    }

    h2{

        font-size:18px;

    }

    #pulsanti{

        flex-direction:column;

    }

    #pulsanti button{

        width:100%;

    }

}


/*=========================================================
    ANIMAZIONI
=========================================================*/

.box{

    animation:fadeIn .35s ease;

}

@keyframes fadeIn{

    from{

        opacity:0;

        transform:translateY(10px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}


/*=========================================================
    MESSAGGI
=========================================================*/

.errore{

    color:var(--rosso);

    font-weight:bold;

}

.successo{

    color:var(--verde);

    font-weight:bold;

}

.info{

    color:var(--blu);

}


/*=========================================================
    CLASSI DI UTILITÀ
=========================================================*/

.centro{

    text-align:center;

}

.destra{

    text-align:right;

}

.sinistra{

    text-align:left;

}

.nascosto{

    display:none;

}

.visibile{

    display:block;

}


/*=========================================================
    LINK
=========================================================*/

a{

    color:var(--blu);

    text-decoration:none;

}

a:hover{

    text-decoration:underline;

}


/*=========================================================
    INPUT
=========================================================*/

input,
select{

    padding:8px;

    border:1px solid var(--bordo);

    border-radius:6px;

    font-size:15px;

}

input:focus,
select:focus{

    outline:none;

    border-color:var(--azzurro);

    box-shadow:0 0 5px rgba(33,150,243,.30);

}


/*=========================================================
    FOOTER
=========================================================*/

footer{

    margin-top:30px;

    color:#666;

    text-align:center;

    font-size:13px;

}



/*=========================================================
 DASHBOARD - STATISTICHE
=========================================================*/

#dashboardStats{

    display:flex;

    flex-wrap:wrap;

    justify-content:space-between;

    gap:20px;

    margin:25px 0;

}

.statBox{

    flex:1;

    min-width:180px;

    background:#ffffff;

    border-radius:12px;

    padding:20px;

    text-align:center;

    box-shadow:0 3px 8px rgba(0,0,0,.15);

    transition:.25s;

}

.statBox:hover{

    transform:translateY(-4px);

}
.statNumero{

    font-size:40px;

    font-weight:700;

    color:#005baa;

}

.statTitolo{

    margin-top:8px;

    color:#666;

    font-size:15px;

    text-transform:uppercase;

    letter-spacing:1px;

}

.cardStatistiche{

    margin-top:12px;

    padding-top:10px;

    border-top:1px solid #e4e4e4;

    font-size:13px;

    color:#666;

}

.cardStatistiche div{

    margin:5px 0;

}




/*=========================================================
 ELENCO GIOCHI
=========================================================*/

.gioco,
.cardGioco{

    display:flex;

    justify-content:space-between;

    align-items:center;

}

.giocoSinistra{

    font-weight:600;

}
.giocoBadge{

    color:#000;

    font-size:14px;

    font-weight:bold;

    min-width:24px;

    text-align:right;

}

/*=========================================================
 ELENCO CATEGORIE
=========================================================*/

.categoria{

    display:flex;

    justify-content:space-between;

    align-items:center;

}

.categoriaSinistra{

    flex:1;

}

.categoriaBadge{

    color:#000;

    font-weight:bold;

    font-size:14px;

    min-width:24px;

    text-align:right;

}


.ricerca{

    width:100%;

    padding:8px 10px;

    margin-bottom:10px;

    border:1px solid #ccc;

    border-radius:6px;

    box-sizing:border-box;

    font-size:14px;

}


/*=========================================================
    FINE FILE
=========================================================*/