/* Reader toolbar (Listen, text size, share). Behaviour in assets/js/p1-reader.js. */

.p1-reader {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 8px 0;
}

.p1-reader__listen,
.p1-reader__size {
    display: flex;
    align-items: center;
    gap: 6px;
}

.p1-reader__listen[hidden],
.p1-reader__listen[hidden] + .p1-reader__sep {
    display: none;
}

/* Prefixed with .p1-reader button: the theme and Elementor style every
   <button> (fill, shadow, padding), so these must win and reset them. */
.p1-reader button.p1-reader__btn {
    display: inline-flex;
    margin: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    background: #FFFFFF;
    color: #111827;
    font-size: 14px;
    font-weight: 590;
    line-height: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.p1-reader button.p1-reader__btn:hover:not(:disabled),
.p1-reader button.p1-reader__btn:focus:not(:disabled) {
    border-color: #00C2A8;
    background: #E6F8F9;
    color: #111827;
}

.p1-reader button.p1-reader__btn:focus-visible,
.p1-reader .p1-reader__speed select:focus-visible {
    outline: 2px solid #00C2A8;
    outline-offset: 2px;
}

.p1-reader button.p1-reader__btn:disabled {
    opacity: .4;
    cursor: default;
}

.p1-reader button.p1-reader__btn[hidden] {
    display: none;
}

.p1-reader button.p1-reader__icon {
    min-width: 36px;
    padding: 6px 10px;
    justify-content: center;
}

.p1-reader button.p1-reader__play.is-playing,
.p1-reader button.p1-reader__play.is-playing:hover:not(:disabled),
.p1-reader button.p1-reader__play.is-playing:focus:not(:disabled) {
    border-color: #00C2A8;
    background: #00C2A8;
    color: #FFFFFF;
}

.p1-reader .p1-reader__time {
    font-weight: 400;
    color: #6B7280;
}

.p1-reader button.p1-reader__play.is-playing .p1-reader__time {
    color: inherit;
}

.p1-reader .p1-reader__speed select {
    margin: 0;
    box-shadow: none;
    width: auto;
    height: auto;
    line-height: 22px;
    min-height: 36px;
    padding: 6px 28px 6px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    background-color: #FFFFFF;
    color: #111827;
    font-size: 14px;
    cursor: pointer;
}

.p1-reader__sep {
    width: 1px;
    height: 20px;
    background: #E5E7EB;
}

/* The block being read aloud. Outline, not background: the site's headings
   use background-clip:text, so a background would hide their text. */
.p1-reading {
    outline: 2px solid #00C2A8;
    outline-offset: 6px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .p1-reader button.p1-reader__btn {
        transition: none;
    }
}
