/* ==========================================================================
   STYLING LEITOR E-READER INTEGRADO
   ========================================================================== */

.reader-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.reader-modal.open {
    display: flex;
}

.reader-container {
    width: 90vw;
    max-width: 1100px;
    height: 90vh;
    background-color: #fcfbfa;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;

    --reader-bg: #fcfbfa;
    --reader-text: #2d3748;
    --reader-font: 'Playfair Display', serif;
}

/* Reader Themes */
.reader-container.theme-sepia {
    --reader-bg: #f4ecd8;
    --reader-text: #5b4636;
}

.reader-container.theme-dark {
    --reader-bg: #1a202c;
    --reader-text: #e2e8f0;
}

.reader-container.theme-light {
    --reader-bg: #ffffff;
    --reader-text: #1a202c;
}

.reader-container.font-sans {
    --reader-font: 'Plus Jakarta Sans', sans-serif;
}

/* Reader Header */
.reader-header {
    background-color: var(--reader-bg);
    color: var(--reader-text);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reader-controls {
    display: flex;
    gap: 8px;
}

.reader-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--reader-text);
}

.reader-btn:hover {
    background: rgba(0,0,0,0.1);
}

.reader-close-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

/* Reader Subbar */
.reader-subbar {
    background-color: var(--reader-bg);
    padding: 8px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--reader-text);
}

.reader-search input {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.8rem;
}

/* Reader Body */
.reader-body-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: var(--reader-bg);
}

.reader-paper {
    flex: 1;
    padding: 40px 60px;
    overflow-y: auto;
    color: var(--reader-text);
    font-family: var(--reader-font);
    font-size: 1.1rem;
    line-height: 1.8;
}

.chapter-num {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-align: center;
    opacity: 0.7;
    margin-top: 20px;
}

.chapter-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.reader-paragraph {
    margin-bottom: 20px;
    text-align: justify;
}

.highlight-search {
    background-color: #fef08a;
    color: #854d0e;
}

/* Notes Panel */
.reader-notes-panel {
    width: 280px;
    border-left: 1px solid rgba(0,0,0,0.1);
    padding: 20px;
    background: rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reader-notes-panel h4 {
    font-size: 0.9rem;
    color: var(--reader-text);
}

#reader-note-input {
    width: 100%;
    height: 80px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-item {
    background: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    border-left: 3px solid var(--brand-terracotta);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Reader Footer */
.reader-footer {
    background-color: var(--reader-bg);
    padding: 12px 24px;
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--brand-terracotta);
    transition: width 0.3s ease;
}