/* Modo apresentação */

.presentation-toggle.is-on,
html.is-presenting .presentation-toggle {
    background: rgba(124, 43, 238, 0.18);
    border-color: rgba(124, 43, 238, 0.55);
    color: #fff;
}

html.is-presenting .floating-cta {
    display: none !important;
}

html.is-presenting-idle,
html.is-presenting-idle * {
    cursor: none !important;
}

.pres-hud {
    position: fixed;
    left: 50%;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 9000;
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(12, 10, 20, 0.82);
    border: 1px solid rgba(167, 139, 250, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #e5e7eb;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

html.is-presenting .pres-hud {
    display: flex;
}

html.is-presenting-idle .pres-hud {
    opacity: 0;
    transform: translateX(-50%) translateY(0.75rem);
    pointer-events: none;
}

.pres-hud-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #c4b5fd;
    white-space: nowrap;
}

.pres-hud-label .material-symbols-outlined {
    font-size: 18px;
}

.pres-hud-counter {
    min-width: 3.5rem;
    margin: 0 0.35rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.pres-hud button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.pres-hud button:hover {
    background: rgba(124, 43, 238, 0.25);
    color: #fff;
}

.pres-hud button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.7);
}

.pres-hud button .material-symbols-outlined {
    font-size: 20px;
}

.pres-hud button.pres-hud-time {
    width: auto;
    gap: 0.25rem;
    padding: 0 0.6rem 0 0.45rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.pres-hud-time b {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.pres-hud button.pres-hud-time .material-symbols-outlined {
    font-size: 18px;
}

.pres-hud button[aria-expanded="true"] {
    background: rgba(124, 43, 238, 0.25);
    color: #fff;
}

.pres-time-menu {
    position: fixed;
    left: 50%;
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 9001;
    width: min(20rem, calc(100vw - 2rem));
    padding: 0.9rem;
    border-radius: 16px;
    background: rgba(12, 10, 20, 0.92);
    border: 1px solid rgba(167, 139, 250, 0.28);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #e5e7eb;
    font-family: 'Outfit', sans-serif;
}

html:not(.is-presenting) .pres-time-menu {
    display: none;
}

.pres-time-title {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pres-time-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.pres-time-presets button {
    padding: 0.45rem 0;
    border-radius: 10px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pres-time-presets button:hover {
    background: rgba(124, 43, 238, 0.2);
}

.pres-time-presets button.is-active {
    background: #7c2bee;
    border-color: #7c2bee;
    color: #fff;
}

.pres-time-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.pres-time-custom input {
    width: 4.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.28);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.pres-time-custom input:focus {
    outline: none;
    border-color: #a78bfa;
}

html.light .pres-time-menu {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(124, 43, 238, 0.25);
    box-shadow: 0 16px 48px rgba(15, 15, 18, 0.15);
    color: #1f2937;
}

html.light .pres-time-title {
    color: #5b21b6;
}

html.light .pres-time-presets button {
    background: rgba(15, 15, 18, 0.03);
    border-color: rgba(124, 43, 238, 0.2);
}

html.light .pres-time-presets button.is-active {
    background: #7c2bee;
    color: #fff;
}

html.light .pres-time-custom input {
    background: #fff;
    color: #1f2937;
}

.pres-hud-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(167, 139, 250, 0.15);
}

.pres-hud-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #7c2bee, #c4b5fd);
    transform: scaleX(0);
    transform-origin: left;
}

html.is-presenting-paused .pres-hud-bar i {
    opacity: 0.45;
}

html.light .pres-hud {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(124, 43, 238, 0.25);
    box-shadow: 0 12px 40px rgba(15, 15, 18, 0.15);
    color: #1f2937;
}

html.light .pres-hud-label {
    color: #5b21b6;
}

html.light .pres-hud-counter {
    color: #6b7280;
}

html.light .pres-hud button:hover {
    background: rgba(124, 43, 238, 0.12);
    color: #5b21b6;
}

@media (max-width: 640px) {
    .presentation-toggle {
        display: none;
    }

    .pres-hud-label span:not(.material-symbols-outlined) {
        display: none;
    }
}
