/* =========================================
   ESTILOS GENERALES LISTEN & READ
   ========================================= */

.listen-read-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.listen-read-animal {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    margin: 0 auto 8px;
}


/* Imagen más compacta en Listen & Build */
.listen-read-animal.build-mode {
    max-width: 340px;
}


.listen-read-sentence {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    padding: 8px 14px;
    border-radius: 16px;
}

.listen-read-chunk {
    display: inline-block;
    
    padding: 8px 16px;
    border-radius: 12px;
    
    /*background-color: #dff3ff;*/
    background-color: #FFEDD4;
    
    font-family: "Teachers", sans-serif;
    font-size: 2rem;
    font-weight: 600;
    
    opacity: 0.5;

    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

/* Chunk activo durante la reproducción */
.listen-read-chunk.active {
    opacity: 1;
    transform: scale(1.06);
    color: #1565c0;
}

/* Chunks interactivos en Listen & Build */
.listen-read-chunk.build-clickable {
    cursor: pointer;
}

.listen-read-chunk.build-clickable:hover {
    transform: translateY(-3px) scale(1.05);
    opacity: 0.85;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
}

.listen-read-chunk.build-locked {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.listen-read-chunk.build-ready {
    opacity: 1;
    cursor: pointer;
}

.listen-read-type {
    font-size: 2rem;
}

.listen-read-type.hidden {
    display: none;
}

.listen-read-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================================
   CONTROLES LISTEN & READ
   ========================================= */

.buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;

    margin-top: 8px;
}


/* Botones comunes */
.icon-button {
    width: 70px;
    height: 70px;

    display: flex;
    justify-content: center;
    align-items: center;

    border: none;
    border-radius: 50%;

    font-size: 2rem;

    cursor: pointer;

    background: white;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* Hover */
.icon-button:hover {
    transform: translateY(-3px) scale(1.06);

    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.22);
}


/* Al pulsar */
.icon-button:active {
    transform: translateY(0) scale(0.96);

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}


/* Botón de audio */
.audio-button {
    background: #dff3ff;
}


/* Botón siguiente */
.next-button {
    background: #e6f7df;
}

.next-button.hidden {
    visibility: hidden;
    pointer-events: none;
}

/* =========================================
   MODAL LISTEN & READ
   ========================================= */

.listen-read-modal {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.45);

    z-index: 1000;
}

.listen-read-modal-content {
    width: 100%;
    max-width: 560px;

    padding: 28px 32px;

    text-align: center;

    background: white;

    border-radius: 24px;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.listen-read-modal-title {
    margin: 0 0 22px;

    font-family: "Teachers", sans-serif;
    font-size: 2rem;
    font-weight: 600;
}

.listen-read-modal-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    margin-bottom: 20px;
}

.listen-read-modal-icon {
    font-size: 2.2rem;
}

.listen-read-modal-arrow {
    font-size: 1.8rem;
}

.listen-read-modal-example {
    display: inline-block;

    padding: 8px 16px;

    border-radius: 12px;

    background-color: #FFEDD4;

    font-family: "Teachers", sans-serif;
    font-size: 1.6rem;
    font-weight: 600;

    color: #1565c0;
}

.listen-read-modal-text {
    margin: 0 0 22px;

    font-family: "Teachers", sans-serif;
    font-size: 1.35rem;
}

.listen-read-modal-button {
    min-width: 130px;

    padding: 12px 24px;

    border: none;
    border-radius: 14px;

    background: #e6f7df;

    font-family: "Teachers", sans-serif;
    font-size: 1.25rem;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.listen-read-modal-button:hover {
    transform: translateY(-2px) scale(1.04);

    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.listen-read-modal-button:active {
    transform: translateY(0) scale(0.97);

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.listen-read-modal.hidden {
    display: none;
}

/* =========================================
   ZONA DE CONSTRUCCIÓN - LISTEN & BUILD
   ========================================= */

.listen-build-zone {
    width: 100%;
    max-width: 470px;
    min-height: 70px;

    margin: 0;

    border: 4px solid #388e3c;
    border-radius: 16px;

    background-color: white;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Oculta la zona mientras no estamos en Build */
.listen-build-zone.hidden {
    display: none;
}

.listen-build-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

.listen-build-row.hidden {
    display: none;
}

.listen-build-type {
    font-size: 2rem;
}

.listen-read-chunk.build-chunk {
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================================
   TAMAÑO DE CHUNKS SEGÚN TIPO - BUILD
   ========================================= */
   
.build-negative-chunk {
    font-size: 1.6rem;
}

.build-question-chunk {
    font-size: 1.6rem;
}

/* =========================================
   FEEDBACK INCORRECTO - LISTEN & BUILD
   ========================================= */

.listen-read-chunk.build-wrong {
    position: relative;
    overflow: hidden;
}

.listen-read-chunk.build-wrong::after {
    content: "";

    position: absolute;
    inset: 0;

    background-color: rgba(220, 50, 50, 0.35);

    border-radius: inherit;

    pointer-events: none;
}