/* Advanced Filter Panel Styles */
.advanced-filter-panel {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.advanced-filter-panel.open {
    flex: 0 0 25%; /* 3/12 grid - 3/9 oranı için */
    min-width: 300px;
    max-width: 400px;
}

.advanced-filter-panel:not(.open) {
    flex: 0 0 auto;
    width: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.panel-header h5 {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

.panel-content {
    padding: 1rem 1.5rem;
}

.filter-section {
    margin-bottom: 1.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.section-header:hover {
    background: #e9ecef;
}

.section-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background: #fff;
}

.section-content.expanded {
    max-height: 1000px;
    padding: 1rem;
}

.filter-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 1rem 0;
    border-top: 1px solid #e1e5e9;
    margin-top: 2rem;
}

/* SearchableSelect Styles */
.searchable-select {
    position: relative;
}

.select-container {
    position: relative;
}

.searchable-select .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
}

.searchable-select .dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.searchable-select .dropdown-item:hover,
.searchable-select .dropdown-item.active {
    background: #e3f2fd;
    color: #1976d2;
}

.searchable-select .dropdown-item:last-child {
    border-bottom: none;
}

/* Form Controls */
.form-control-solid {
    background-color: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-solid:focus {
    background-color: #fff;
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
    outline: none;
}

.form-select-solid {
    background-color: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select-solid:focus {
    background-color: #fff;
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
    outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advanced-filter-panel.open {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .panel-content {
        padding: 1rem;
    }
    
    .section-content.expanded {
        padding: 0.75rem;
    }
}

/* Animation for chevron icon */
.section-header fluent-icon {
    transition: transform 0.3s ease;
}

.section-content.expanded + .section-header fluent-icon,
.section-header:has(+ .section-content.expanded) fluent-icon {
    transform: rotate(180deg);
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.125em;
}

/* Scrollbar styling */
.advanced-filter-panel::-webkit-scrollbar {
    width: 6px;
}

.advanced-filter-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.advanced-filter-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.advanced-filter-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.searchable-select .dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.searchable-select .dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.searchable-select .dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.searchable-select .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Container layout for filter and table */
.filter-table-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.filter-table-container .table-container {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Collapsed state */
.advanced-filter-panel:not(.open) .panel-content {
    display: none;
}

.advanced-filter-panel:not(.open) {
    width: auto;
    min-width: auto;
} 