/* Presentation Mode Styles */
body.presentation-mode {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Base styles for slides */
.slide {
    padding: 1rem 0;
    box-sizing: border-box;
    width: 100%;
    opacity: 1;
    filter: blur(0);
    transition: opacity .3s ease-in-out, filter .3s ease-in-out;
}

/* Hide sidebar and nav immediately when in presentation mode */
.presentation-mode aside.sidebar,
.presentation-mode .sidebar-toc,
.presentation-mode .sidebar-related,
.presentation-mode .footer,
.presentation-mode .nav-left,
.presentation-mode .hamburger,
.presentation-mode #jekyll-seamless-backlinks {
    display: none !important;
}

.presentation-mode .nav {
    pointer-events: none;
    background: transparent;
    border: none;
    box-shadow: none;
}

.presentation-mode .nav-right {
    pointer-events: auto;
}

/* Center layout elements */
.presentation-mode .page-layout {
    display: block !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

.presentation-mode main {
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
}

.presentation-mode .slide {
    padding-left: 8rem;
    padding-right: 8rem;
}

/* Presentation UI Container */
.presentation-ui {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

/* Base override for nav right since we removed it from normal flow */
.nav-right .presentation-ui {
    position: fixed;
}

.presentation-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    height: 34px;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
}

.presentation-btn svg {
    width: 18px;
    height: 18px;
}

.presentation-btn:hover {
    background: var(--bg2);
    color: var(--accent);
}

/* Hide enlarge, next, and prev buttons by default */
#text-size-toggle,
#prev-slide-btn,
#next-slide-btn {
    display: none;
}

/* Show them only in presentation mode */
.presentation-mode #text-size-toggle,
.presentation-mode #prev-slide-btn,
.presentation-mode #next-slide-btn {
    display: flex;
}

.presentation-mode .presentation-btn {
    background: var(--title);
    color: var(--bg);
    border-color: var(--title);
}

.presentation-mode .presentation-btn:hover,
.presentation-mode .presentation-btn:active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* Toggle specific SVGs in Presentation button */
.icon-pause {
    display: none;
}
.presentation-mode .icon-pause {
    display: block;
}
.presentation-mode .icon-present {
    display: none;
}   

/* Hide non-selected slides */
.presentation-mode .slide.non-selected {
    opacity: 0.25;
    filter: blur(4px);
    pointer-events: none;
}

/* Toggled Large Text Mode */
html.large-text {
    font-size: 17.5px; /* 14px × 1.25 */
}

.presentation-mode #text-size-toggle.active,
html.large-text .presentation-mode #text-size-toggle {
    background: var(--accent);
    color: var(--bg);
    fill: var(--bg);
    border-color: var(--accent);
}

/* Slide Indicator */
#slide-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: black;
    color: white;
    padding: 2px 8px;
    height: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-code);
    font-size: 0.8em;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-sm);
    opacity: 0.7;
}

.presentation-mode #slide-indicator {
    display: block;
}