/* styles.css */

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Header Styling */
header {
    background-color: #34645c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

header .logo img {
    max-height: 70px;
}

header .user-profile img {
    max-height: 40px;
}

header .user-profile img:hover {
    cursor: pointer;
}

header .settings i {
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sidebar Styling */
#sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
    width: 60px;
    min-height: 100vh;
    /* background-image: url("../images/sidenav_long.png"); */
    background-color: #172e2a;
    background-size: cover;
    background-repeat: no-repeat;
    position: fixed;
    top: 0;
    left: 0;
    overflow-x: hidden;
    transition: width 0.3s;
    z-index: 999;
    padding-top: 70px; /* Adjust for header overlap */
}

#sidebar ul {
    padding: 0;
    list-style-type: none;
    margin: 0;
}

#sidebar ul li {
    position: relative;
}

#sidebar ul li a {
    color: #a5d5a7;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

#sidebar ul li a img.sidebar-icon {
    width: 30px; /* Icon size */
    transition: all 0.3s ease; /* Smooth transition */
}

#sidebar ul li a img.sidebar-icon {
    width: 26px; /* Icon size */
    height: 26px;
    transition: all 0.3s ease; /* Smooth transition */
}

#sidebar ul li:hover a img.sidebar-icon {
    width: 26px; /* Ensure the size stays the same on hover */
    height: 26px;
}

#sidebar ul li a span {
    display: none;
}

#sidebar ul li a.active,
#sidebar ul li a:hover {
    background-color: #5d827c; /* Highlight color on hover */
    color: #ffd700;
}

#sidebar ul li ul.submodule {
    display: none;
    position: fixed;
    left: 70px; /* Adjust according to sidebar width */
    top: 72px;
    min-width: 160px;
    text-align: center;
    background-color: #0a1412; /* Slightly darker red for differentiation */
    padding: 0px;
    z-index: 1000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.9s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

#sidebar ul li:hover ul.submodule {
    display: block;
    opacity: 0.9;
    pointer-events: auto;
    transition: opacity 0.8s ease-in-out;

}

#sidebar:hover {
    width: 240px;
}

#sidebar:hover ul li a span {
    display: inline;
}




/* Content Styling */
#content {
    position: fixed !important;
    padding: 0px;
    min-height: calc(100vh - px);
    margin-top: 60px; 
    margin-left:70px;
    position: fixed;
    width: calc(100% - 70px);
    height: calc(100vh -  70px);
    padding: 10px;
}


#content-footer {
    display: flex;
    justify-content: center;  
    align-items: center;     
    position: fixed;
    bottom: 0;
    left: 0;                 
    right: 0;                 
    height: var(--footer-height);
    background-color: #375751; 
    color: #fff; 
    z-index: 200;
    text-align: center;
    padding: 10px;    
    font-size: 15px;        
}

#content-footer.active {
    width: 100%;              
}



#sidebar:hover ~ #content {
    margin-left: 250px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #sidebar {
        width: 50px;
    }

    #sidebar:hover {
        width: 150px;
    }

    #content {
        margin-left: 50px;
    }

    #sidebar:hover ~ #content {
        margin-left: 150px;
    }
    #content-box {
        width: 100%;
    }

    #content-box.active {
        width: calc(100% - 250px);
    }

    #content {
        width: 100%;
    }

    #content.active {
        width: calc(100% - 250px);
    }

    #content-footer {
        width: 100%;
    }
}
/* Ensure sidebar has a height of 100% */
#sidebar {
    height: 100vh; /* Full viewport height */
    display: flex;
    flex-direction: column;
}

ul.list-unstyled {
    flex-grow: 1; /* Make the submodule listing take up remaining space */
    margin: 0;
    padding: 0;
    height: 100%; /* Ensure the submodule listing takes full height */

}

/* Styling for Module Title in Submodule */
.submodule {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure the submodule listing takes full height */
    background-color: #800000; /* Slightly darker red for better contrast */
}

.submodule .module-title {
    font-weight: bold;
    font-size: 16px;
    color: #ffd700 ;
    padding: 10px 15px;
    background-color: #0a1412; /* Darker shade for title background */
    text-transform: uppercase;
    border-bottom: 1px solid #fff; /* Underline */
    margin-bottom: 10px; /* Space between title and first submodule item */
    flex-shrink: 0; /* Prevent the title from shrinking */
}

.submodule li {
    flex-grow: 1;
}

.submodule li a {
    color: #fff;
    padding: 5px 15px;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s;
}

.submodule li a:hover {
    background-color: #c82333;
}

.submodule li:last-child {
    margin-bottom: 0;
}

/* Add Button Css */
.add-btn {
    background-color: #37ff44;  /* Example: change background color */
    color: #000;                /* Example: change text color */
    padding: 10px 15px;          /* Example: custom padding */
    border-radius: 15px; 
    font-size: 15px;
    font-weight: 200;         
}

.bck-btn {
    background-color: #ff3737;  /* Example: change background color */
    color: #000;                /* Example: change text color */
    padding: 12px 18px;          /* Example: custom padding */
    border-radius: 15px; 
    font-size: 15px;
    font-weight: 600;         
}

.save-btn {
    background-color: #37ff44;  /* Example: change background color */
    color: #000;                /* Example: change text color */
    padding: 12px 25px;          /* Example: custom padding */
    border-radius: 15px; 
    font-size: 15px;
    font-weight: 600;         
}