/**
 * Layout CSS
 *
 * Core layout styles for content wrapper and sidebar positioning.
 * Extracted from base.html for better caching and maintainability.
 */

body {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.content-wrapper {
    transition: margin-left 0.3s ease, margin-right 0.3s ease, width 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Adjust content width based on sidebar states */
.sidebar-active .content-wrapper {
    margin-left: 240px;
    width: calc(100% - 240px);
}

.sidebar-collapsed .content-wrapper {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* Handle right sidebar */
.right-sidebar-active .content-wrapper {
    margin-right: 240px;
}

.right-sidebar-collapsed .content-wrapper {
    margin-right: 60px;
}

/* Combined state handling */
.sidebar-active.right-sidebar-active .content-wrapper {
    width: calc(100% - 240px - 240px);
}

.sidebar-active.right-sidebar-collapsed .content-wrapper {
    width: calc(100% - 240px - 60px);
}

.sidebar-collapsed.right-sidebar-active .content-wrapper {
    width: calc(100% - 60px - 240px);
}

.sidebar-collapsed.right-sidebar-collapsed .content-wrapper {
    width: calc(100% - 60px - 60px);
}

@media (max-width: 768px) {
    .content-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
}
