.merosath-news-reader {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid #d9e6f2;
    border-radius: 10px;
    background: #f4f9fd;
    font-size: 14px;
}

.merosath-news-reader__controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.merosath-news-reader button {
    min-height: 38px;
    border: 1px solid #c6d8e7;
    border-radius: 7px;
    padding: 7px 11px;
    background: #fff;
    color: #17324d;
    cursor: pointer;
    font: inherit;
}

.merosath-news-reader__play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-color: #1769aa !important;
    background: #1769aa !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.merosath-news-reader__stop {
    padding-inline: 12px !important;
}

.merosath-news-reader__voice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.merosath-news-reader__voice select {
    min-height: 38px;
    border: 1px solid #c6d8e7;
    border-radius: 7px;
    padding: 6px 30px 6px 9px;
    background: #fff;
    color: #17324d;
    font: inherit;
    cursor: pointer;
}

.merosath-news-reader__speed {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.merosath-news-reader__speed > span {
    margin-right: 2px;
    font-weight: 600;
}

.merosath-news-reader__speed button.is-active {
    border-color: #1769aa;
    background: #e5f1fa;
    color: #12568c;
    font-weight: 600;
}

.merosath-news-reader__status {
    flex: 1 1 100%;
    min-height: 18px;
    color: #536778;
    font-size: 13px;
}

.merosath-news-reader__auto-next {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #17324d;
    font-weight: 600;
    cursor: pointer;
}

.merosath-news-reader__auto-next input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #1769aa;
    cursor: pointer;
}

.merosath-news-reader__up-next {
    flex: 1 1 100%;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
    padding: 8px 10px;
    border-left: 3px solid #1769aa;
    background: #eef6fb;
    color: #38546a;
    font-size: 13px;
    line-height: 1.45;
}

.merosath-news-reader__up-next strong {
    color: #17324d;
    font-weight: 700;
}


.merosath-reader-content {
    display: contents;
}

/* Global stop control: remains visible while speech is playing or paused,
 * including when the reader itself has scrolled out of view. */
.merosath-global-audio-stop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999999;
    min-height: 48px;
    padding: 10px 18px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #b42318;
    color: #ffffff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.merosath-global-audio-stop:hover,
.merosath-global-audio-stop:focus-visible {
    background: #8f1d14;
    outline: 3px solid rgba(180, 35, 24, 0.25);
    outline-offset: 2px;
}

.merosath-global-audio-stop:focus-visible {
    outline-style: solid;
}

/* Visible transition notice shown before the next article starts. */
.merosath-global-audio-transition {
    position: fixed;
    right: 20px;
    bottom: 82px;
    z-index: 999998;
    max-width: min(520px, calc(100vw - 40px));
    padding: 10px 16px;
    border: 1px solid #b8d4e8;
    border-radius: 10px;
    background: #ffffff;
    color: #17324d;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

@media (max-width: 600px) {
    .merosath-news-reader {
        align-items: flex-start;
    }

    .merosath-news-reader__controls,
    .merosath-news-reader__voice {
        width: 100%;
    }

    .merosath-news-reader__voice {
        justify-content: space-between;
    }

    .merosath-news-reader__voice select {
        flex: 1;
        max-width: 220px;
    }

    .merosath-news-reader__speed {
        width: 100%;
        flex-wrap: wrap;
    }

    .merosath-news-reader__auto-next {
        width: 100%;
    }

    .merosath-news-reader__up-next {
        width: 100%;
        flex-wrap: wrap;
    }

    .merosath-global-audio-stop {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: calc(100% - 24px);
        min-height: 50px;
    }

    .merosath-global-audio-transition {
        right: 12px;
        bottom: 74px;
        left: 12px;
        max-width: none;
    }
}


.merosath-news-reader__progress {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 2px;
}

.merosath-news-reader__progress-label {
    min-width: 42px;
    color: #38546a;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.merosath-news-reader__progress-track {
    flex: 1;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #dce9f2;
}

.merosath-news-reader__progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #1769aa;
    transition: width 0.2s ease;
}

@media (max-width: 600px) {
    .merosath-news-reader__progress {
        width: 100%;
    }
}


.merosath-global-audio-stop {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
}

.merosath-global-audio-stop__label {
    white-space: nowrap;
}

.merosath-global-audio-stop__pause,
.merosath-global-audio-stop__next,
.merosath-global-audio-stop__stop {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
    font-size: 0 !important;
    line-height: 0;
}

.merosath-global-audio-stop__pause::before {
    content: "";
    display: block;
    width: 3px;
    height: 13px;
    border: 0;
    border-radius: 1px;
    background: #fff !important;
    box-shadow: 6px 0 0 #fff;
}

.merosath-global-audio-stop__pause[aria-label="फेरि सुन्नुहोस्"]::before {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #fff;
    border-right: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

.merosath-global-audio-stop__next::before {
    content: "⏭";
    display: block;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.merosath-global-audio-stop__stop::before {
    content: "";
    display: block;
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 1px;
    background: #fff !important;
}

.merosath-global-audio-stop__pause:hover,
.merosath-global-audio-stop__next:hover,
.merosath-global-audio-stop__stop:hover,
.merosath-global-audio-stop__pause:focus-visible,
.merosath-global-audio-stop__next:focus-visible,
.merosath-global-audio-stop__stop:focus-visible {
    background: rgba(255, 255, 255, 0.3) !important;
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 1px;
}

@media (max-width: 600px) {
    .merosath-global-audio-stop {
        justify-content: center;
    }
}


/* Continuous News only: skip the current article and continue with the next. */
.merosath-news-reader__skip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-color: #1769aa !important;
    background: #eef6fb !important;
    color: #12568c !important;
    font-weight: 600 !important;
}
.merosath-news-reader__skip:hover,
.merosath-news-reader__skip:focus-visible {
    background: #dceefa !important;
    outline: 2px solid rgba(23, 105, 170, 0.22);
    outline-offset: 1px;
}


/* Auto-next preference lives in the global floating audio player. */
.merosath-global-audio-stop__auto-next{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    width:112px;
    min-width:112px;
    height:32px;
    margin:0 1px;
    padding:3px 5px 3px 10px;
    box-sizing:border-box;
    border:1px solid #c9cdd2;
    border-radius:999px;
    background:#f1f2f4;
    color:#34383d;
    cursor:pointer;
    font:600 13px/1.2 inherit;
    white-space:nowrap;
    box-shadow:inset 0 1px 1px rgba(0,0,0,.04);
}
.merosath-global-audio-stop__auto-next-label{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
}
.merosath-global-audio-stop__auto-next input{
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    padding:0;
    overflow:hidden;
    clip:rect(0 0 0 0);
    clip-path:inset(50%);
    border:0;
    white-space:nowrap;
}
.merosath-global-audio-stop__auto-next-switch{
    position:relative;
    display:inline-flex;
    flex:0 0 34px;
    align-items:center;
    width:34px;
    height:20px;
    border:1px solid #b9bdc3;
    border-radius:999px;
    background:#c5c8cd;
    box-sizing:border-box;
    transition:background .16s ease,border-color .16s ease;
}
.merosath-global-audio-stop__auto-next-thumb{
    position:absolute;
    top:2px;
    left:2px;
    width:14px;
    height:14px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 1px 3px rgba(0,0,0,.25);
    transition:transform .16s ease;
}
.merosath-global-audio-stop__auto-next input:checked + .merosath-global-audio-stop__auto-next-switch{
    border-color:#1769aa;
    background:#1769aa;
}
.merosath-global-audio-stop__auto-next input:checked + .merosath-global-audio-stop__auto-next-switch .merosath-global-audio-stop__auto-next-thumb{
    transform:translateX(14px);
}
.merosath-global-audio-stop__auto-next:focus-within{
    outline:2px solid rgba(255,255,255,.75);
    outline-offset:2px;
}
.merosath-global-audio-stop__auto-next:hover{
    background:#e8eaed;
}
@media (max-width:600px){
    .merosath-global-audio-stop__auto-next{
        width:112px;
        min-width:112px;
    }
    .merosath-global-audio-stop{
        gap:7px;
        padding-inline:10px;
    }
}
