/* Styles for the slide-in side menu */

/* Prevent scrolling when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Below menu, above everything else */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.slide-in-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    background-color: var(--surface-color);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
}

.menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.slide-in-menu.is-open {
    transform: translateX(0);
}

.close-menu-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: 300;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 5rem;
    text-align: left;
}

.menu-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-nav a:hover {
    background-color: var(--surface-secondary-color);
}

.menu-nav .button {
    text-align: center;
    margin-top: 1rem;
}