/* Meridiano Reader Suite Styles */

/* 1. TOP STICKY PROGRESS BAR */
.meridiano-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 999999;
    pointer-events: none;
}
.meridiano-reading-progress .progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #B51A1A;
    transition: width 0.1s ease-out;
}

/* 2. READER TOOLBOX CONTAINER */
.meridiano-reader-box {
    background: #FFFFFF;
    border: 1px solid #D8D6CE;
    border-top: 3px solid #111111;
    margin: 25px 0 35px;
    padding: 16px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* AUDIO PANEL */
.m-reader-audio-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #E8E6DF;
    flex-wrap: wrap;
    gap: 12px;
}
.m-audio-ctrl {
    display: flex;
    align-items: center;
    gap: 14px;
}
.m-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #111111;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.1s ease;
}
.m-play-btn:hover {
    background: #B51A1A;
    transform: scale(1.04);
}
.m-audio-info {
    display: flex;
    flex-direction: column;
}
.m-audio-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #B51A1A;
}
.m-audio-status {
    font-size: 13px;
    color: #555555;
}

/* WAVE ANIMATION */
.m-audio-settings {
    display: flex;
    align-items: center;
    gap: 16px;
}
.m-wave-visualizer {
    display: flex;
    gap: 3px;
    align-items: center;
    height: 18px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}
.m-wave-visualizer.is-playing {
    opacity: 1;
}
.m-wave-visualizer span {
    display: inline-block;
    width: 3px;
    height: 6px;
    background: #B51A1A;
    border-radius: 2px;
}
.m-wave-visualizer.is-playing span:nth-child(1) { animation: m-wave 0.8s ease-in-out infinite alternate; }
.m-wave-visualizer.is-playing span:nth-child(2) { animation: m-wave 0.6s ease-in-out 0.2s infinite alternate; }
.m-wave-visualizer.is-playing span:nth-child(3) { animation: m-wave 0.9s ease-in-out 0.4s infinite alternate; }
.m-wave-visualizer.is-playing span:nth-child(4) { animation: m-wave 0.7s ease-in-out 0.1s infinite alternate; }
.m-wave-visualizer.is-playing span:nth-child(5) { animation: m-wave 0.5s ease-in-out 0.3s infinite alternate; }

@keyframes m-wave {
    0% { height: 4px; }
    100% { height: 18px; }
}

.m-pill-btn {
    background: #F0EEE9;
    border: 1px solid #D8D6CE;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #111111;
    cursor: pointer;
    transition: background 0.2s ease;
}
.m-pill-btn:hover {
    background: #E2DFD7;
}

/* ACTIONS BAR (FONT & MODES) */
.m-reader-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    flex-wrap: wrap;
    gap: 12px;
}
.m-meta-pill {
    font-size: 12px;
    color: #666666;
    font-weight: 600;
}
.m-reader-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.m-font-controls, .m-theme-modes {
    display: inline-flex;
    border: 1px solid #D8D6CE;
    border-radius: 4px;
    overflow: hidden;
}
.m-ctrl-btn, .m-theme-btn {
    background: #FFFFFF;
    border: none;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    transition: background 0.15s ease;
    border-right: 1px solid #E8E6DF;
}
.m-ctrl-btn:last-child, .m-theme-btn:last-child {
    border-right: none;
}
.m-ctrl-btn:hover, .m-theme-btn:hover {
    background: #F5F3EE;
}
.m-theme-btn.is-active {
    background: #111111;
    color: #FFFFFF;
}
.m-share-btn {
    background: #FFFFFF;
    border: 1px solid #D8D6CE;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #111111;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.m-share-btn:hover {
    border-color: #B51A1A;
    color: #B51A1A;
}

/* 3. READING MODES FOR ARTICLE (SEPIA / DARK) */
body.m-reading-sepia {
    background-color: #F4ECD8 !important;
}
body.m-reading-sepia .ast-separate-container,
body.m-reading-sepia .single-post .entry-content,
body.m-reading-sepia .site-content {
    background-color: #F4ECD8 !important;
    color: #433422 !important;
}
body.m-reading-sepia .meridiano-reader-box {
    background-color: #EFE6CD !important;
    border-color: #D6CBB0 !important;
}

body.m-reading-dark {
    background-color: #161616 !important;
    color: #E2E2E2 !important;
}
body.m-reading-dark .ast-separate-container,
body.m-reading-dark .single-post .entry-content,
body.m-reading-dark .site-content {
    background-color: #161616 !important;
    color: #E0E0E0 !important;
}
body.m-reading-dark .entry-title,
body.m-reading-dark h1, body.m-reading-dark h2, body.m-reading-dark h3,
body.m-reading-dark strong, body.m-reading-dark a {
    color: #FFFFFF !important;
}
body.m-reading-dark .meridiano-reader-box {
    background-color: #222222 !important;
    border-color: #333333 !important;
    border-top-color: #B51A1A !important;
}
body.m-reading-dark .m-audio-status,
body.m-reading-dark .m-meta-pill {
    color: #AAAAAA !important;
}
body.m-reading-dark .m-ctrl-btn,
body.m-reading-dark .m-theme-btn,
body.m-reading-dark .m-share-btn,
body.m-reading-dark .m-pill-btn {
    background: #2D2D2D !important;
    color: #EEEEEE !important;
    border-color: #444444 !important;
}
body.m-reading-dark .m-theme-btn.is-active {
    background: #B51A1A !important;
    color: #FFFFFF !important;
}
