/* Custom Off-Canvas Menu Styles */
#custom-offcanvas-slideout {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px; /* Adjust width as needed */
    max-width: 90%; /* Responsive adjustment */
    background-color: #fff; /* Set background color */
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%); /* Start off-screen */
    transition: all 0.3s ease; /* Smooth transition */
    z-index: 999999; /* Ensure it appears above other elements */
    overflow-y: hidden; /* Hide overflow initially, scroll on wrap */
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Show the off-canvas menu when opened */
#custom-offcanvas-slideout.opened {
    visibility: visible;
    opacity: 1;
    transform: translateX(0); /* Slide into view */
}

/* Inner content styles */
#custom-offcanvas-slideout .inner {
    position: relative;
    height: 100%;
    display: flex; /* Use flexbox for internal layout */
    flex-direction: column; /* Stack header, body vertically */
}

/* Close button styles */
.btn-close-custom-offcanvas {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    z-index: 10001; /* Higher than the off-canvas menu content */
    background: none;
    border: none;
    padding: 0;
}

.btn-close-custom-offcanvas i {
    font-size: 24px;
    font-weight: 300;
}

/* Off-canvas wrap for content and scrolling */
#custom-offcanvas-slideout .custom-offcanvas-wrap {
    padding: 20px;
    background-color: #fff; /* Set to desired background color */
    flex-grow: 1; /* Allow content to grow and take available space */
    overflow-y: auto; /* Enable scrolling for content */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Removed off-canvas header styles as it's no longer needed */
/*
.custom-offcanvas-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    position: relative;
    z-index: 10;
}

h3.custom-offcanvas-title {
    font-size: 24px;
    margin: 0;
    padding-right: 40px;
    color: #333;
    word-wrap: break-word;
}
*/

/* Off-canvas body styles */
.custom-offcanvas-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.custom-offcanvas-content {
    padding: 10px 0; /* Padding inside the content area */
    line-height: 1.6;
    color: #555;
	margin-top: -28px;
}


/* Overlay Styles */
#custom-offcanvas-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    z-index: 9999; /* Should be less than the off-canvas menu's z-index */
    transition: opacity 0.3s ease;
}

/* Show overlay when off-canvas menu is opened */
body.custom-offcanvas-opened #custom-offcanvas-overlay {
    display: block;
    opacity: 1;
}

/* Prevent body scrolling when off-canvas is open */
body.no-scroll {
    overflow: hidden;
}

/* Removed default styling for .open-custom-offcanvas to avoid conflicts */
/*
.open-custom-offcanvas {
    display: inline-block;
    padding: 10px 15px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.open-custom-offcanvas:hover {
    background-color: #005177;
}
*/

/* Responsive adjustments */
@media only screen and (max-width: 768px) {
    #custom-offcanvas-slideout {
        width: 100%; /* Full width on smaller screens */
        max-width: 100%;
    }
}