/* Stile di base per il corpo della pagina */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.custom-switch {
    transform: scale(1.5) !important;
}

/* Stile del contenitore principale */
.container {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Stile per l'header */
h1 {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

/* Stile per la barra di ricerca */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    height: 58px;
    border-radius: 18px 0 0 18px;
    padding-left: 50px;
    font-size: 1.1rem;
    border: 1px solid #d6d6d6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, .15);
}

.search-icon {
    position: absolute;
    left: 18px;
    color: #888;
    font-size: 1.2rem;
    z-index: 10;
}

.search-clear-btn {
    height: 58px;
    border-radius: 0 18px 18px 0 !important;
    margin-bottom: 0;
    padding-left: 20px;
    padding-right: 20px;
    white-space: nowrap;
}

@media (max-width: 768px) {

    .search-input {
        font-size: 1rem;
        padding-left: 45px;
    }

    .search-clear-btn {
        font-size: 0.95rem;
        padding-left: 14px;
        padding-right: 14px;
    }

}

/* Stile per l'editor di testo */
#song-editor {
    width: 100%;
    height: 200px;
    padding: 10px;
    margin-bottom: 15px;
    color: #000000;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

/* Stile per i pulsanti */
button {
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn {
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
}

/* Stile per la lista delle canzoni */
#songs-list {
    margin-top: 20px;
}

.song-item {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Stile per il file input */
#file-input {
    margin-top: 10px;
    margin-bottom: 10px;
}

.btn-custom {
    background-color: white;
    color: black;
    border-color: #dc3545;
}

.btn-custom.active {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Assicurati che il PDF sia scrollabile */
iframe {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    /* Abilita lo scorrimento fluido su iOS */
    height: 100vh;
    /* Altezza massima per l'iframe */
}

/* Pulsanti schermata pastore */
.buttons-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.swal2-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
}

.form-check-label {
    font-size: 1.2rem;
}

.custom-switch {
    /* Ingrandisce lo switch */
    transform: scale(1.5);
}

/* Compattta SOLO i brani che contengono almeno uno span con font-size: 8pt (con o senza spazio) */
div[id^="song-content-"]:has(:is(span[style*="font-size: 8pt"], span[style*="font-size:8pt"])) {
    line-height: 1.1;
}

/* Azzera margini dei <p> solo dentro quei brani */
div[id^="song-content-"]:has(:is(span[style*="font-size: 8pt"], span[style*="font-size:8pt"])) p {
    margin: 0;
    padding: 0;
}

/* Collassa <br> consecutivi SOLO in quei brani (evita le “righe vuote” doppie) */
div[id^="song-content-"]:has(:is(span[style*="font-size: 8pt"], span[style*="font-size:8pt"])) br+br {
    display: none;
}