﻿body {
    font-family: monospace;
    margin: 30px;
}
/***/
#top-controls {
    /*    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;*/
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    max-width: 95%;
}

pre {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 16px; /* tamaño inicial */
}

.acorde-text {
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: default;
    color: red;
    background-color: #ffe5e5;
}

#settings-btn {
    /*position: fixed;*/
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.dropdown-menu {
    min-width: 220px;
    padding: 10px;
}

/* Estilo para el control de tamaño */
.font-size-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

    .font-size-control button {
        width: 30px;
        height: 30px;
        font-size: 18px;
        padding: 0;
        border-radius: 4px;
        border: 1px solid #ccc;
        background: white;
        cursor: pointer;
    }

    .font-size-control span {
        width: 40px;
        text-align: center;
        font-weight: bold;
    }

.hoja-transcripcion {
    max-width: 800px; /* ancho similar a hoja carta */
    background: white;
    padding: 50px 60px;
    margin: 10px auto; /* centra en la página */
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    border-radius: 4px;
}

#autoscroll-controls {
    /*position: fixed;*/
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}
/* Evitar cortar bloques dentro del pre */
.hoja-transcripcion pre {
    page-break-inside: avoid;
    break-inside: avoid;
}

    /* Evitar cortar líneas dentro de pre */
    .hoja-transcripcion pre > * {
        page-break-inside: avoid;
        break-inside: avoid;
    }

/* Si tienes divs o párrafos, también evitar cortes */
.hoja-transcripcion p,
.hoja-transcripcion div {
    page-break-inside: avoid;
    break-inside: avoid;
}

.titulo-cancion {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 30px; /* <-- Este es el espacio grande arriba */
    margin-bottom: 5px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
}
selectorInstrumento {
    min-width: 120px;
    font-weight: 500;
}

#selectorInstrumento option {
    font-size: 14px;
}
.hoja-transcripcion pre,
.hoja-transcripcion div,
.hoja-transcripcion p,
.hoja-transcripcion section,
.hoja-transcripcion article {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}
#autoscroll-fixed {
    position: fixed;
    top: 30%;
    left: 10px;
    z-index: 2000;
    background-color: #fff;
    padding: 10px 10px 15px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 180px;
    transition: transform 0.3s ease;
    touch-action: none;
    user-select: none;
    cursor: move;
}

.autoscroll-visible {
    transform: translateX(0);
    opacity: 0.5;
}
#show-autoscroll-btn {
    white-space: nowrap; /* 🧷 Previene salto de línea inesperado */
    overflow: hidden; /* 🛡️ Evita desbordamiento interno */
    text-overflow: ellipsis; /* … si el texto no cabe */
    display: flex; /* 🔧 Mejora control de layout interno */
    /*align-items: center;*/ /* Centra verticalmente */
    /*gap: 6px;*/ /* Espacio entre ➕ Autoscroll y ▶️ */
    max-width: 150px; /* (opcional) Limita ancho */
    box-sizing: border-box; /* 🔒 Asegura que padding no altere ancho */
    user-select: none; /* Previene selección de texto durante drag */
}
#show-autoscroll-btn {
    position: fixed;
    top: 30%;
    left: 0;
    z-index: 2100;
    display: none;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    padding: 2px 4px;
    font-size: 13px;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    color: #333;
    touch-action: none;
    user-select: none;
    cursor: move;
}

.autoscroll-hidden {
    transform: translateX(200px); /* Desliza hacia la izquierda */
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


/*responsive*/

/* Transcripción en móvil */
@media (max-width: 768px) {
    .hoja-transcripcion {
        max-width: 100%;
        padding: 5px 5px;
        margin: 10px;
        border-radius: 0;
        box-shadow: none;
    }

  
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    #autoscroll-fixed {
        left: auto;
        right: 10px; /* mueve al lado derecho */
        width: 130px;
        font-size: 14px;
    }

        #autoscroll-fixed button {
            font-size: 12px !important;
            padding: 4px 6px !important;
        }

        #autoscroll-fixed .btn-close {
            width: 1rem;
            height: 1rem;
        }

        #autoscroll-fixed .fw-bold {
            font-size: 14px;
        }

    #velocidadDisplay {
        font-size: 16px;
    }
}


/* En móvil: moverlo a la derecha */
@media (max-width: 768px) {
    #show-autoscroll-btn {
        left: auto;
        right: 0;
        top: 30%; /* Aseguramos que se mantenga igual */
        border-radius: 6px 0 0 6px; /* Redondeado al otro lado */
        opacity:0.4;
        
    }
}
pre {
    white-space: pre;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}
#show-autoscroll-btn span:first-of-type {
    font-size: 18px; /* para el ➕ */
}

#show-autoscroll-btn span:last-of-type {
    font-size: 18px; /* para el ▶️ */
}

.modo-solo-letra .acorde-text {
    display: none !important;
}
