/* Container */
.mwe-minimalist-menu-container {
    position: relative;
    display: inline-block;
}

/* Hamburger Button */
.mwe-hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 99999;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 45px;
    height: 35px;
    transition: opacity 0.3s ease-in-out;
}

.mwe-hamburger-btn:focus {
    outline: none;
}

.mwe-hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* Base Panel Styles */
.mwe-offcanvas-panel {
    position: fixed;
    top: 0;
    width: 350px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    z-index: 99998;
    overflow-y: auto;
    padding: 80px 30px 30px;
    display: flex;
    flex-direction: column;
}

.mwe-offcanvas-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Hide hamburger when opened to avoid overlapping text, rely on inner close icon */
.mwe-minimalist-menu-container.mwe-menu-open .mwe-hamburger-btn {
    opacity: 0;
    pointer-events: none;
}

/* Default Right Alignment (and fallback) */
.mwe-offcanvas-panel,
.mwe-position-right .mwe-offcanvas-panel {
    right: -350px;
    left: auto;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
.mwe-minimalist-menu-container.mwe-menu-open .mwe-offcanvas-panel,
.mwe-position-right .mwe-minimalist-menu-container.mwe-menu-open .mwe-offcanvas-panel {
    right: 0;
}

/* Left Alignment */
.mwe-position-left .mwe-offcanvas-panel {
    left: -350px;
    right: auto;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
.mwe-position-left .mwe-minimalist-menu-container.mwe-menu-open .mwe-offcanvas-panel {
    left: 0;
}

/* Close Button explicitly in the offcanvas panel */
.mwe-close-btn {
	position: absolute;
	top: 25px;
	right: 30px; /* Always fixed at the top right inside the panel */
	background: none;
	border: none;
	font-size: 38px;
	line-height: 1;
	cursor: pointer;
	color: #333;
	display: block; /* Show the button */
	transition: color 0.3s;
	padding: 0;
	z-index: 10;
}

.mwe-close-btn:hover {
    color: #0073aa;
}

/* Overlay */
.mwe-offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    z-index: 99997;
}

.mwe-minimalist-menu-container.mwe-menu-open .mwe-offcanvas-overlay {
    opacity: 1;
    visibility: visible;
}

/* WordPress Menu Styles */
.mwe-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mwe-nav-menu li {
    margin-bottom: 15px;
}

.mwe-nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.2s;
}

.mwe-nav-menu a:hover {
    color: #0073aa;
}
