.rd-reflection-complete {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.rd-reflection-readable {
    min-width: 0;
    max-width: 100%;
}

.rd-native-reader {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 1.35rem;
    padding: .85rem;
    border: 1px solid rgba(110, 88, 56, .20);
    border-radius: 12px;
    background: rgba(250, 248, 243, .78);
    color: inherit;
    overflow: hidden;
}

.rd-native-reader *,
.rd-native-reader *::before,
.rd-native-reader *::after {
    box-sizing: border-box;
}

.rd-native-reader__row,
.rd-native-reader__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}

.rd-native-reader__button,
.rd-native-reader__settings summary {
    min-height: 44px;
    border: 1px solid rgba(90, 70, 42, .32);
    border-radius: 9px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
}

.rd-native-reader__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem .85rem;
}

.rd-native-reader__button--primary {
    border-color: rgba(76, 87, 54, .55);
    background: rgba(241, 244, 235, .92);
}

.rd-native-reader__button:hover,
.rd-native-reader__settings summary:hover {
    filter: brightness(.98);
}

.rd-native-reader__button:focus-visible,
.rd-native-reader__settings summary:focus-visible,
.rd-native-reader select:focus-visible,
.rd-native-reader input:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.rd-native-reader__settings {
    margin-top: .65rem;
}

.rd-native-reader__settings summary {
    display: inline-flex;
    align-items: center;
    padding: .6rem .75rem;
    list-style-position: inside;
    user-select: none;
}

.rd-native-reader__settings-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, .55fr) minmax(150px, .55fr);
    gap: .75rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(110, 88, 56, .15);
}

.rd-native-reader__field {
    min-width: 0;
}

.rd-native-reader__field label {
    display: block;
    margin-bottom: .3rem;
    font-size: .92rem;
    font-weight: 600;
}

.rd-native-reader select,
.rd-native-reader input[type="range"] {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    font: inherit;
}

.rd-native-reader__volume-line {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.rd-native-reader__volume-line input {
    flex: 1 1 auto;
    min-width: 0;
}

.rd-native-reader__volume-line output {
    flex: 0 0 3.2rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rd-native-reader__status,
.rd-native-reader__unavailable {
    margin: .55rem 0 0;
    font-size: .9rem;
}

.rd-native-reader [hidden] {
    display: none !important;
}



/* =========================================================
   v1.3.2 — CORRECCIÓN VISUAL DEL LECTOR ACTIVO
   Mantiene los controles legibles aunque el tema de WordPress
   aplique reglas globales agresivas a botones, spans o palabras.
   ========================================================= */

.rd-native-reader__controls {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.rd-native-reader__button {
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

.rd-native-reader__button > span {
    min-width: 0;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

.rd-native-reader__button > span:last-child {
    white-space: nowrap !important;
}

.rd-native-reader__button > span:first-child {
    flex: 0 0 auto;
}

@media (max-width: 680px) {
    .rd-native-reader {
        width: 100%;
        max-width: 100%;
        padding: .75rem;
        border-radius: 10px;
        overflow: visible;
    }

    /*
     * Una sola columna en el contenedor exterior.
     * Así los controles activos nunca quedan atrapados en "media"
     * columna, que era lo que hacía que PAUSAR y DETENER aparecieran
     * letra por letra en algunos móviles/temas.
     */
    .rd-native-reader__row {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .rd-native-reader__controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
        max-width: 100%;
        gap: .6rem;
    }

    .rd-native-reader__button--primary {
        display: flex;
        width: 100%;
    }

    .rd-native-reader__button {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: .7rem .65rem;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
        font-size: 1rem;
        line-height: 1.15;
    }

    .rd-native-reader__button > span:last-child {
        display: inline-block;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    .rd-native-reader__settings {
        width: 100%;
        margin-top: .7rem;
    }

    .rd-native-reader__settings summary {
        display: flex;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        padding: .65rem .75rem;
        white-space: nowrap;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    .rd-native-reader__settings-panel {
        grid-template-columns: 1fr;
    }

    .rd-native-reader__status,
    .rd-native-reader__unavailable {
        width: 100%;
        margin-top: .7rem;
        overflow-wrap: normal;
        word-break: normal;
    }
}


/* =========================================================
   v1.3.3 — COMPATIBILIDAD CON REFLEXIONES ANTERIORES
   Fuerza la geometría del lector sobre estilos heredados del tema.
   ========================================================= */
@media (max-width: 680px) {
    .rd-reflection-complete .rd-native-reader .rd-native-reader__row {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__controls {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: .6rem !important;
        align-items: stretch !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__button,
    .rd-reflection-complete .rd-native-reader .rd-native-reader__controls .rd-native-reader__button {
        display: inline-flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 48px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__button > span {
        display: inline-block !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        writing-mode: horizontal-tb !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__settings,
    .rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}


/* =========================================================
   v1.3.4 — ESTADOS DEL LECTOR: SOLO LO NECESARIO
   En reposo se muestran únicamente "Escuchar reflexión" y
   "Voz y velocidad". Pausa/continuar/detener aparecen solo
   mientras existe una sesión de lectura activa.

   Estas reglas están al final y con especificidad suficiente para
   neutralizar estilos heredados de temas y de las reparaciones
   móviles anteriores que podían forzar display!important y hacer
   visibles botones marcados con [hidden].
   ========================================================= */
.rd-reflection-complete .rd-native-reader [hidden],
.rd-reflection-complete .rd-native-reader .rd-native-reader__controls[hidden],
.rd-reflection-complete .rd-native-reader .rd-native-reader__button[hidden] {
    display: none !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="stopped"] .rd-native-reader__controls,
.rd-reflection-complete .rd-native-reader[data-rd-state="finished"] .rd-native-reader__controls {
    display: none !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="stopped"] [data-rd-action="listen"],
.rd-reflection-complete .rd-native-reader[data-rd-state="finished"] [data-rd-action="listen"] {
    display: inline-flex !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="playing"] [data-rd-action="listen"],
.rd-reflection-complete .rd-native-reader[data-rd-state="paused"] [data-rd-action="listen"] {
    display: none !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="playing"] .rd-native-reader__controls,
.rd-reflection-complete .rd-native-reader[data-rd-state="paused"] .rd-native-reader__controls {
    display: grid !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="playing"] [data-rd-action="pause"],
.rd-reflection-complete .rd-native-reader[data-rd-state="playing"] [data-rd-action="stop"] {
    display: inline-flex !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="playing"] [data-rd-action="resume"] {
    display: none !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="paused"] [data-rd-action="resume"],
.rd-reflection-complete .rd-native-reader[data-rd-state="paused"] [data-rd-action="stop"] {
    display: inline-flex !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="paused"] [data-rd-action="pause"] {
    display: none !important;
}

@media (max-width: 680px) {
    .rd-reflection-complete .rd-native-reader[data-rd-state="stopped"] [data-rd-action="listen"],
    .rd-reflection-complete .rd-native-reader[data-rd-state="finished"] [data-rd-action="listen"] {
        display: flex !important;
        width: 100% !important;
    }

    .rd-reflection-complete .rd-native-reader[data-rd-state="playing"] .rd-native-reader__controls,
    .rd-reflection-complete .rd-native-reader[data-rd-state="paused"] .rd-native-reader__controls {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   v1.3.6 — LECTOR CENTRADO Y MINIMALISTA
   Mantiene intacta la lógica del lector y la reparación persistente.
   Reduce el peso visual del bloque y centra sus controles.
   ========================================================= */
.rd-reflection-complete .rd-native-reader {
    width: min(100%, 460px) !important;
    max-width: 460px !important;
    margin: 0 auto 1.5rem !important;
    padding: .35rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__controls {
    flex: 0 1 auto !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    max-width: 100% !important;
    gap: .45rem !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__button,
.rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary {
    width: auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: .48rem .75rem !important;
    border: 1px solid rgba(90, 70, 42, .25) !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: .92rem !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__button--primary {
    border-color: rgba(76, 87, 54, .40) !important;
    background: rgba(241, 244, 235, .55) !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__button:hover,
.rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary:hover {
    background: rgba(90, 70, 42, .06) !important;
    filter: none !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__settings {
    width: 100% !important;
    margin: .45rem 0 0 !important;
    text-align: center !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    list-style: none !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary::-webkit-details-marker {
    display: none;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__settings-panel {
    width: 100% !important;
    margin-top: .7rem !important;
    padding: .8rem !important;
    border: 1px solid rgba(110, 88, 56, .15) !important;
    border-radius: 12px !important;
    background: rgba(250, 248, 243, .55) !important;
    text-align: left !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__status,
.rd-reflection-complete .rd-native-reader .rd-native-reader__unavailable {
    text-align: center !important;
}

@media (max-width: 680px) {
    .rd-reflection-complete .rd-native-reader {
        width: min(100%, 390px) !important;
        max-width: 390px !important;
        padding: .25rem .4rem !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__row {
        display: flex !important;
    }

    .rd-reflection-complete .rd-native-reader[data-rd-state="stopped"] [data-rd-action="listen"],
    .rd-reflection-complete .rd-native-reader[data-rd-state="finished"] [data-rd-action="listen"] {
        display: inline-flex !important;
        width: auto !important;
    }

    .rd-reflection-complete .rd-native-reader[data-rd-state="playing"] .rd-native-reader__controls,
    .rd-reflection-complete .rd-native-reader[data-rd-state="paused"] .rd-native-reader__controls {
        display: flex !important;
        flex-wrap: wrap !important;
        width: auto !important;
        grid-template-columns: none !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__button,
    .rd-reflection-complete .rd-native-reader .rd-native-reader__controls .rd-native-reader__button,
    .rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary {
        width: auto !important;
        min-height: 40px !important;
        padding: .52rem .72rem !important;
        font-size: .9rem !important;
    }
}

/* =========================================================
   v1.3.7 — CONTROLES PRINCIPALES EN UNA SOLA LÍNEA
   Mantiene el lector centrado/minimalista y fuerza que todos los
   controles visibles (escuchar, pausar/continuar, detener y ajustes)
   compartan la misma línea horizontal mientras Ajustes esté cerrado.
   Al abrir Ajustes, su panel pasa debajo para conservar legibilidad.
   ========================================================= */
.rd-reflection-complete .rd-native-reader {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center !important;
    align-items: center !important;
    column-gap: .45rem !important;
    row-gap: .35rem !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__row {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: .45rem !important;
    order: 1 !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__controls,
.rd-reflection-complete .rd-native-reader[data-rd-state="playing"] .rd-native-reader__controls,
.rd-reflection-complete .rd-native-reader[data-rd-state="paused"] .rd-native-reader__controls {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: .45rem !important;
}

.rd-reflection-complete .rd-native-reader[data-rd-state="playing"] .rd-native-reader__controls,
.rd-reflection-complete .rd-native-reader[data-rd-state="paused"] .rd-native-reader__controls {
    display: flex !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__settings {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: center !important;
    order: 2 !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

/* El panel de configuración sí baja a una fila propia cuando se abre. */
.rd-reflection-complete .rd-native-reader .rd-native-reader__settings[open] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: .35rem !important;
    order: 4 !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__settings[open] summary {
    display: inline-flex !important;
    margin: 0 auto !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__status,
.rd-reflection-complete .rd-native-reader .rd-native-reader__unavailable {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    order: 5 !important;
}

@media (max-width: 680px) {
    .rd-reflection-complete .rd-native-reader {
        flex-wrap: wrap !important;
        column-gap: .32rem !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__row,
    .rd-reflection-complete .rd-native-reader .rd-native-reader__controls,
    .rd-reflection-complete .rd-native-reader[data-rd-state="playing"] .rd-native-reader__controls,
    .rd-reflection-complete .rd-native-reader[data-rd-state="paused"] .rd-native-reader__controls {
        flex-wrap: nowrap !important;
        gap: .32rem !important;
    }

    .rd-reflection-complete .rd-native-reader .rd-native-reader__button,
    .rd-reflection-complete .rd-native-reader .rd-native-reader__controls .rd-native-reader__button,
    .rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 38px !important;
        padding: .46rem .58rem !important;
        font-size: .84rem !important;
        white-space: nowrap !important;
    }
}

/* =========================================================
   v1.3.9 — PORTABILIDAD ENTRE SITIOS
   El lector debe conservar exactamente su geometría aun cuando el tema del
   destino aplique float, márgenes, text-align o anchos globales a controles.
   Estas reglas son deliberadamente locales al componente.
   ========================================================= */
.rd-reflection-complete .rd-native-reader {
    float: none !important;
    clear: both !important;
    left: auto !important;
    right: auto !important;
    text-align: center !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__row,
.rd-reflection-complete .rd-native-reader .rd-native-reader__controls {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__button,
.rd-reflection-complete .rd-native-reader .rd-native-reader__settings,
.rd-reflection-complete .rd-native-reader .rd-native-reader__settings summary {
    float: none !important;
}

.rd-reflection-complete .rd-native-reader .rd-native-reader__button {
    margin: 0 !important;
}
