/* Portal Component Styles */
/* Reusable component styles for sidebar menus, cards, headers, and dropdowns across Portal pages */

.bg-menu-ul {
    padding-inline-start: 0;
    margin-bottom: 0;
}

.bg-menu-li-spacer {
    display: flex;
}

.bg-menu-item {
    font-size: 1.05rem !important;
    background-color: #ffffff;
    padding: 0.5em 1em;
    display: flex;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #dee2e6; /* Thin border between items */
}

.bg-menu-item:first-child {
    border-top: 1px solid #dee2e6; /* Border on top of first item */
}

.bg-menu-item:hover {
    background-color: #f8f9fa;
}

.bg-menu-item.k-selected-bg {
    background-color: #e9ecef;
    border-left: 3px solid var(--brand-orange);
    padding-left: calc(1em - 3px);
}

.bg-menu {
    border: 1px solid #dee2e6; /* Thin border around menu */
    background-color: #ffffff;
    overflow-y: auto;
}

.bg-menu-header {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75em 1em;
    border-bottom: 1px solid #dee2e6;
    background-color: #ffffff;
    text-align: left;
}

.h-100-head {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.h-100-head .k-card-body {
    flex: 1;
    overflow-y: auto;
}

.overflowy {
    overflow-y: auto;
}

.float-container {
    display: inline-block;
}

.float-container label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #495057;
}

.select-125 {
    width: 125px;
}

.select-200 {
    width: 200px;
}

.dropdown-uniform {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

/* Utility class for allowing title truncation in flex layouts */
/* Setting min-width: 0 allows flex items to shrink below their content size, enabling text-truncate to work */
.flex-title-container {
    min-width: 0;
}

/* Card header styling for page headers */
.k-card-header {
    background-color: #f8f9fa;
    display: flex;
    align-items: center; /* Vertically center title in header */
    min-height: 30px; /* Ensure adequate height for proper centering */
}

/* Header title styling */
.k-card-header h5 {
    font-size: 1.1rem; /* Slightly bigger title */
    margin: 0;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    /* Add margin below left menu card on mobile for proper spacing */
    .row > [class*="col-"]:first-child .k-card {
        margin-bottom: 1rem;
    }
    
    /* Match padding on left and right columns for alignment */
    .row > [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Fixed sidebar layout for portal index pages */
.portal-index-container {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
}

.portal-sidebar {
    width: 240px;
    flex-shrink: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.portal-content {
    flex: 1;
    padding-right: 0.5rem;
    min-width: 0; /* Allow content to shrink */
}

/* Responsive layout for screens under 992px (Bootstrap lg breakpoint) */
@media (max-width: 991.98px) {
    .portal-index-container {
        flex-direction: column;
    }
    
    .portal-sidebar {
        width: 100%;
        margin-bottom: 1rem;
        padding: 0;
    }
    
    .portal-content {
        padding: 0;
    }
}
