/* Fullscreen / presentation mode */

/* Segmented control (for font size buttons) */
.toolbar-segmented {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.toolbar-seg-btn {
    border: none;
    background: none;
    color: #888;
    cursor: pointer;
    width: 28px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.toolbar-seg-btn:not(:last-child) {
    border-right: 1px solid #ddd;
}
.toolbar-seg-btn:hover { background: #eee; color: #333; }
.toolbar-seg-btn.active { background: #e0e0e0; color: #333; }

/* Container */
#fullscreen-container { display: none; }
#fullscreen-container:fullscreen {
    display: flex; flex-direction: column; background: white; width: 100%; height: 100%;
}

/* Bottom bar */
#fullscreen-bottom-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 1.5rem; pointer-events: none;
}
#fullscreen-bottom-left {
    display: flex; align-items: center; gap: 0.75rem; pointer-events: auto;
}
#fullscreen-font-controls { pointer-events: auto; }
#fullscreen-powered-by {
    font-size: 0.8rem; color: rgba(0,0,0,0.4);
    display: flex; align-items: center; gap: 0.2rem;
    text-decoration: none;
    padding: 0.2rem 0.5rem; border-radius: 4px;
    border: 1px solid transparent; transition: border-color 0.2s;
    cursor: pointer;
}
#fullscreen-powered-by:hover { border-color: rgba(0,0,0,0.3); }
#fullscreen-powered-by svg { opacity: 0.5; position: relative; top: -0.5px; }
#fullscreen-page-info {
    font-size: 0.8rem; color: rgba(0,0,0,0.4);
}

/* Content area */
#fullscreen-content {
    flex: 1; overflow-y: auto; width: 100%;
    padding: 2rem 6% 4rem;
    font-family: 'Charter', 'Georgia', 'Times New Roman', serif;
    font-size: 1.05rem; line-height: 1.7;
}
#fullscreen-content h1, #fullscreen-content h2, #fullscreen-content h3 { margin-top: 1rem; margin-bottom: 0.5rem; }
#fullscreen-content p { margin-bottom: 0.6rem; }
#fullscreen-content ul, #fullscreen-content ol { margin-left: 1.5rem; margin-bottom: 0.6rem; }
#fullscreen-content pre { background: #f5f5f5; padding: 0.8rem; border-radius: 4px; overflow-x: auto; }
#fullscreen-content code { background: #f0f0f0; padding: 0.15rem 0.3rem; border-radius: 3px; font-size: 0.9em; }
#fullscreen-content pre code { background: none; padding: 0; }
#fullscreen-content blockquote { border-left: 3px solid #ddd; padding-left: 1rem; color: #666; }
#fullscreen-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 0.5rem 0; }

/* Exit button */
#fullscreen-exit-btn {
    position: fixed; top: 1rem; right: 1rem; z-index: 12;
    padding: 0.4rem 0.5rem; border: 1px solid #ccc; border-radius: 4px;
    background: white; cursor: pointer; opacity: 0; transition: opacity 0.3s;
    pointer-events: none; font-size: 0;
}
#fullscreen-exit-btn.visible { opacity: 0.7; pointer-events: auto; }
#fullscreen-exit-btn.visible:hover { opacity: 1; }

/* Sidebar (hidden, slides in from left on mouse proximity) */
#fullscreen-sidebar {
    position: fixed; left: 0; top: 0; height: 100%; width: 240px;
    background: #fff; border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    transform: translateX(-100%); transition: transform 0.3s ease;
    z-index: 11; display: flex; flex-direction: column;
}
#fullscreen-sidebar.visible { transform: translateX(0); }
#fullscreen-sidebar-title {
    padding: 1rem 0.8rem 0.6rem; font-size: 1rem; font-weight: 700; color: #222;
    border-bottom: 1px solid #e0e0e0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#fullscreen-sidebar-pages {
    flex: 1; overflow-y: auto; padding: 0.4rem 0;
}
#fullscreen-sidebar-pages .fs-page-item {
    padding: 0.4rem 0.8rem; cursor: pointer; font-size: 0.85rem;
    color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    border-left: 3px solid transparent; transition: background 0.1s;
}
#fullscreen-sidebar-pages .fs-page-item:hover { background: #eee; }
#fullscreen-sidebar-pages .fs-page-item.active {
    background: #e8f0fe; color: #1a73e8; border-left-color: #1a73e8; font-weight: 600;
}
