/* Reader theme control — fixed, accessible and isolated from theme form defaults. */
.dv-reader-theme-control[hidden] {
    display: none !important;
}
.dv-reader-theme-control:not([hidden]) {
    display: inline-flex !important;
    box-sizing: border-box;
    align-items: center !important;
    justify-content: flex-start;
    gap: 7px;
    width: auto;
    max-width: calc(100vw - 28px);
    min-height: 48px;
    height: auto;
    padding: 1px 9px 1px 11px !important;
    margin: 0 !important;
    border: 1px solid #bdc4c3;
    border-radius: 8px;
    background: #ffffff;
    color: #242424;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.dv-reader-theme-control--fallback {
    position: fixed;
    /* Remains visible on scroll; leave the right-side consent/back-to-top alone. */
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.dv-reader-theme-control .dv-reader-theme-label {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
    color: inherit;
    font: inherit;
}
.dv-reader-theme-control .dv-reader-theme-icon {
    display: grid !important;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit;
}
.dv-reader-theme-control .dv-reader-theme-icon::before {
    display: block;
    content: "\2600";
    line-height: 1;
}
html[data-dv-reader-theme="dark"] .dv-reader-theme-control {
    color: #f4f7f8;
    background: #262626;
    border-color: #595959;
}
html[data-dv-reader-theme="dark"] .dv-reader-theme-control .dv-reader-theme-icon::before {
    content: "\263e";
    color: #8bc53f;
}
/* The7 adds a 10px bottom margin to select controls. Reset it explicitly.
   Keep the semantic native select, but draw a consistent, compact chevron. */
.dv-reader-theme-control .dv-reader-theme-select {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    flex: 0 0 88px;
    box-sizing: border-box !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 19px 0 9px !important;
    color: inherit !important;
    background-color: transparent !important;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%) !important;
    background-position: calc(100% - 10px) 50%, calc(100% - 6px) 50% !important;
    background-size: 4px 4px, 4px 4px !important;
    background-repeat: no-repeat !important;
    border: 0 !important;
    border-inline-start: 1px solid #bdc4c3 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font: inherit !important;
    line-height: normal !important;
    cursor: pointer;
    align-self: center;
}
html[data-dv-reader-theme="light"] .dv-reader-theme-control .dv-reader-theme-select {
    color-scheme: light;
}
html[data-dv-reader-theme="dark"] .dv-reader-theme-control .dv-reader-theme-select {
    color-scheme: dark;
    border-inline-start-color: #595959 !important;
}
.dv-reader-theme-control .dv-reader-theme-select:focus-visible {
    outline: 2px solid #186d58 !important;
    outline-offset: -2px;
}
html[data-dv-reader-theme="dark"] .dv-reader-theme-control .dv-reader-theme-select:focus-visible {
    outline-color: #8bc53f !important;
}
