/* assets/css/compact_forms.css */

/* --- Styled Segmented Control (View Mode Toggle) --- */
.view-mode-toggle {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    /* Slightly more rounded */
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.view-mode-toggle label {
    margin-bottom: 0;
    /* Bootstrap override */
    position: relative;
    cursor: pointer;
}

.view-mode-toggle .toggle-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    /* Increased padding */
    gap: 8px;
    /* Added gap for icon/text spacing */
    font-size: 0.8em;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.view-mode-toggle input[type="radio"] {
    display: none;
}

.view-mode-toggle input[type="radio"]:checked+.toggle-option {
    background: var(--primary-accent);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.view-mode-toggle input[type="radio"]:not(:checked):hover+.toggle-option {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* --- Compact Grid Layout --- */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Force flex-start and wrap */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Reduced gap */
    align-items: flex-end;
    justify-content: flex-start;
}

.secondary-actions {
    flex-wrap: nowrap !important;
    /* Force single row for secondary actions */
}

/* Sizing Helpers - STRICT Fixed Widths */
.w-date {
    flex: 0 0 160px !important;
    max-width: 160px !important;
    min-width: 160px !important;
}

/* Slightly wider for status text */
.w-status {
    flex: 0 0 120px !important;
    max-width: 120px !important;
    min-width: 120px !important;
}

.w-emp-id {
    flex: 0 0 90px !important;
}

/* Reduced width for employee dropdown */
.w-employee {
    flex: 0 0 250px !important;
    /* Fixed width, do NOT grow */
    max-width: 250px !important;
    min-width: 250px !important;
}

.w-section {
    flex: 0 0 220px !important;
    max-width: 220px !important;
    min-width: 220px !important;
}

.w-reason {
    flex: 0 0 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
}

.w-auto {
    flex: 0 1 auto !important;
    width: auto !important;
}

/* Compact Inputs */
.form-control-compact {
    height: 30px !important;
    /* Even smaller */
    padding: 3px 8px !important;
    font-size: 0.85em !important;
}

.input-with-icon.compact input,
.input-with-icon.compact select {
    height: 30px !important;
    padding-left: 30px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

.input-with-icon.compact .icon {
    font-size: 0.85em;
    left: 8px;
}

.form-label-compact {
    font-size: 0.75em !important;
    margin-bottom: 2px !important;
    color: var(--text-muted);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Fix for Double Scrollbars in Custom Dropdowns */
.custom-dropdown-panel ul {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
}

.custom-dropdown-panel {
    overflow: visible !important;
    /* Allow the UL to handle scrolling */
}