﻿body {
    background-color: #f9f9f9;
}
/*  LOADER */
.global-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
/*FINE LOADER*/



header {
    background-color: #004080;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-grow: 1;
}

    .menu a {
        color: white;
        text-decoration: none;
        font-weight: 500;
    }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-container {
    background: white;
    padding: 20px;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.preview-img {
    max-width: 100%;
    border-radius: 10px;
}

<!-- FORM HOME-- >

.text-row {
    display: flex;
    align-items: start;
    gap: 10px;
    margin-bottom: 20px;
}

.text-row textarea {
    flex-grow: 1;
    resize: none;
}

.btn-group-vertical-custom {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/********************************** EVENTI   ***********************************/
/* Modal fixed size */
.modal-dialog {
    max-width: 600px;
    width: 100%;
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 12px;
    overflow: hidden;
}

/* Modal body con scroll automatico se necessario */
.modal-body {
    max-height: 500px; /* altezza massima della body */
    overflow-y: auto;
    padding: 1.5rem;
}

/* Titolo */
#prevTitolo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Giorno, Orario */
#prevGiorno, #prevOrario {
    font-weight: 500;
}

/* Descrizione */
#prevDescrizione {
    max-height: 120px;
    overflow-y: auto;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Contenitore immagine */
.preview-img {
    width: 100%;
    max-height: 250px; /* altezza massima fissa */
    object-fit: contain; /* scala tutta l'immagine senza ritagliarla */
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: #f2f2f2;
}
/********************************** FINE EVENTI   ***********************************/

/********************************** LIBRI   ***********************************/
.availability-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}



.libro-card {
    padding: 12px; /* spazio interno generale */
}

.libro-card-inner {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.card-left {
    width: 120px;
    flex-shrink: 0;
    position: relative;
}

.libro-copertina {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ccc;
}

    .libro-copertina.placeholder {
        background-color: #f0f0f0;
        width: 120px;
        height: 180px;
        border-radius: 8px;
        border: 1px dashed #ccc;
    }

.card-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative; /* necessario per absolute delle icone */
    padding-left: 12px;
}

.card-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}


.availability-badge {
    top: 4px;
    left: 4px;
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    border-radius: 4px;
    
}

.availability-true {
    background-color: green;
}

.availability-false {
    background-color: red;
}

.card-icons-top {
    top: 8px;
    right: 8px;
}

.icon-action {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.category-badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    border-radius: 4px;
    background-color: #007bff; /* blu bootstrap */
    color: red;
}
/********************************** FINE LIBRI   ***********************************/
/************************************ LOGIN  **********************************************/


.login-card {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 100%;
}

    .login-card h2 {
        font-weight: bold;
        margin-bottom: 1.5rem;
        text-align: center;
        color: #007BFF; /* titolo blu */
    }

.form-control:focus {
    border-color: #28A745; /* verde */
    box-shadow: 0 0 0 0.2rem rgba(40,167,69,.25);
}

.btn-login {
    background-color: #FFC107; /* giallo */
    border: none;
    color: #fff;
    font-weight: bold;
}

    .btn-login:hover {
        background-color: #e0a800;
    }

.text-center a {
    color: #007BFF;
    text-decoration: none;
}

    .text-center a:hover {
        text-decoration: underline;
    }

.container_login{
    width: 100%;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}
/************************************ FINE LOGIN  **********************************************/

/* Cabine */
.card-actions {
    z-index: 10; /* sopra tutto */
}

    .card-actions a {
        pointer-events: auto; /* riceve click */
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        padding: 6px;
        line-height: 1;
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }

.card-img-top {
    position: relative;
    z-index: 1;
}
/* Fine cabine*/
