/* Freelancer Dashboard Layout & Sidebar Styles */

/* Layout Structure */
.dashboard-full-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-wrapper {
    display: flex;
    flex: 1;
    width: 100%;
}

/* Desktop Sidebar Styling (min-width: 992px) */
@media (min-width: 992px) {
    .dashboard-wrapper > div:first-child {
        width: 280px !important;
        flex: 0 0 280px !important;
        max-width: 280px !important;
        background: #dc2626 !important; /* Premium Red */
        border-right: none;
        z-index: 99;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
    }

    .profile-settings-menu {
        background-color: transparent !important;
        padding: 24px 16px !important;
    }

    .sidebar-user-profile-card {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px;
        margin-bottom: 32px;
        background: #ffffff !important; /* White card on red sidebar */
        border-radius: 12px;
        color: #dc2626 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Base Styles (apply to both unless overridden) */
.profile-settings-menu-inner {
    background-color: transparent;
}

.profile-settings-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-settings-menu-item {
    margin-bottom: 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-settings-menu-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ffffff !important; /* White text on red */
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* Icon Colors */
.profile-settings-menu-item-link svg path,
.profile-settings-menu-item-link svg rect,
.profile-settings-menu-item-link svg line {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    transition: all 0.2s ease;
}

/* Handle Icons Without Strokes */
.profile-settings-menu-item-link svg path:not([stroke]),
.profile-settings-menu-item-link svg rect:not([stroke]) {
    stroke: none !important;
}

/* Handle Icons With Only Strokes */
.profile-settings-menu-item-link svg path[stroke],
.profile-settings-menu-item-link svg rect[stroke],
.profile-settings-menu-item-link svg line[stroke] {
    fill: none !important;
}

/* Active State */
.profile-settings-menu-item.active {
    background-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-settings-menu-item.active .profile-settings-menu-item-link {
    color: #dc2626 !important; /* Red text on white active item */
    font-weight: 700;
}

.profile-settings-menu-item.active svg path,
.profile-settings-menu-item.active svg rect,
.profile-settings-menu-item.active svg line {
    fill: #dc2626 !important;
    stroke: #dc2626 !important;
}

/* Hover State */
.profile-settings-menu-item:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.profile-settings-menu-item:not(.active):hover .profile-settings-menu-item-link {
    color: #ffffff !important;
}

/* Responsive */
@media (max-width: 991px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    /* Sidebar Column */
    .dashboard-wrapper > div:first-child {
        width: 0 !important;
        max-width: 0 !important;
        flex: none !important;
        border-right: none !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        position: relative;
        z-index: 1000;
        overflow: visible;
    }

    /* Remove White Layer Background */
    .profile-settings-menu {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        position: static !important;
        width: 100%;
    }

    /* Toggle Button Positioning */
    .profile-bars {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        background: #dc2626 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    }

    /* Off-Canvas Sidebar Content */
    .profile-settings-menu-inner {
        position: fixed !important;
        top: 0;
        left: -320px; /* Start off-screen */
        width: 280px;
        height: 100vh;
        background: #dc2626 !important; /* Red background on mobile off-canvas */
        z-index: 1002;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 24px 16px !important;
        overflow-y: auto;
        box-shadow: 4px 0 15px rgba(0,0,0,0.2);
        visibility: hidden;
        opacity: 0;
    }

    .profile-settings-menu-inner.active {
        left: 0;
        visibility: visible;
        opacity: 1;
    }

    /* Close Button */
    .profile-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        background: rgba(220, 38, 38, 0.1);
        color: #dc2626 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        cursor: pointer;
    }

    /* Overlay Backdrop */
    .responsive-overlay.active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        z-index: 1001;
        display: block !important;
    }

    .dashboard-content-wrapper {
        padding: 80px 15px 20px; /* Space for the floating toggle */
    }
}
