/* Smart Sidebar Menu Styles */

:root {
    --ssm-transition-speed: 0.3s;
    --ssm-bg-overlay: rgba(0, 0, 0, 0.5);
    --ssm-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Overlay */
.ssm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ssm-bg-overlay);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--ssm-transition-speed) ease;
}

.ssm-overlay.ssm-active {
    visibility: visible;
    opacity: 1;
}

/* Sidebar Container defaults (Left) */
.ssm-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    /* Default */
    height: 100vh;
    min-width: 250px;
    background: #fff;
    z-index: 2147483647;
    /* Max Z-Index */
    transform: translateX(-100%);
    transition: transform var(--ssm-transition-speed) ease;
    box-shadow: var(--ssm-shadow);
    display: flex;
    flex-direction: column;
    visibility: visible !important;
    /* Force visibility */
}

.ssm-sidebar.ssm-right {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

.ssm-sidebar.ssm-open {
    transform: translateX(0) !important;
    visibility: visible !important;
}

/* Header */
.ssm-sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ssm-title {
    margin: 0;
    font-size: 1.25rem;
}

.ssm-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: inherit;
    padding: 0 5px;
}

/* Content */
.ssm-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Menu List */
.ssm-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ssm-menu li {
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ssm-menu a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.ssm-menu a:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Dropdown Toggle */
.ssm-dropdown-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    background: rgba(0, 0, 0, 0.02);
}

.ssm-dropdown-toggle i {
    transition: transform 0.3s ease;
}

.ssm-dropdown-toggle.ssm-open i {
    transform: rotate(180deg);
}

/* Submenus */
.ssm-submenu {
    display: none;
    list-style: none;
    padding-left: 0;
    background: rgba(0, 0, 0, 0.03);
}

.ssm-submenu li a {
    padding-left: 30px;
}

.ssm-submenu .ssm-submenu li a {
    padding-left: 45px;
}

/* Floating Trigger Positions */
.ssm-trigger-btn {
    position: fixed !important;
    /* Force fixed */
    z-index: 2147483647;
    /* Max Z-Index */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s;
}

/* Hide Trigger when Sidebar is Open */
body.ssm-open-body .ssm-trigger-btn {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.ssm-trigger-btn:hover {
    transform: scale(1.1);
}

/* Bottom Left */
.ssm-pos-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Bottom Right */
.ssm-pos-bottom-right {
    bottom: 20px;
    right: 20px;
    left: auto;
}

/* Top Left */
.ssm-pos-top-left {
    top: 20px;
    left: 20px;
    bottom: auto;
}

/* Top Right */
.ssm-pos-top-right {
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
}

/* Middle Left */
.ssm-pos-middle-left {
    top: 50%;
    left: 20px;
    bottom: auto;
    transform: translateY(-50%);
}

.ssm-pos-middle-left:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Middle Right */
.ssm-pos-middle-right {
    top: 50%;
    right: 20px;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
}

.ssm-pos-middle-right:hover {
    transform: translateY(-50%) scale(1.1);
}


/* Responsive */
@media screen and (max-width: 768px) {
    .ssm-sidebar {
        width: 80% !important;
        max-width: 300px;
    }
}