/* contact-filter-section.css - Filter Section Styles for Contact Directory */

/* ================================================
   FILTER SECTION CONTAINER
   ================================================ */
.contact-filter-section {
    border: 3px solid #3b82f6;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 20px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
}

/* Hide any possible center line overlay */
.contact-filter-section::before,
.contact-filter-section::after {
    display: none !important;
    content: none !important;
}

/* Override report-details-left border that bleeds through */
.contact-filter-section .report-details-left,
.report-details-left {
    border-right: none !important;
}

/* Remove any internal borders/dividers */
.contact-filter-section .filter-dropdowns-row {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.contact-filter-section .filter-dropdowns-row::before,
.contact-filter-section .filter-dropdowns-row::after {
    display: none !important;
    content: none !important;
}

.contact-filter-section .filter-group {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.contact-filter-section .filter-group::before,
.contact-filter-section .filter-group::after {
    display: none !important;
    content: none !important;
}

/* Dark theme support */
.theme-dark .contact-filter-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #60a5fa;
}

/* ================================================
   FILTER DROPDOWNS ROW - 6-Column Grid
   All columns align vertically across rows:
   Col 1: Year / Category / Company
   Col 2: Month / Account / Phone  
   Col 3: Date From / Classification left half / Group Name left half
   Col 4: Date To / Classification right half / Group Name right half
   Col 5: Amount Min / SubClass1 left half / SubClass2 left half
   Col 6: Amount Max / SubClass1 right half / SubClass2 right half
   ================================================ */
.filter-dropdowns-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    align-items: end;
}

.filter-dropdowns-row:last-child {
    margin-bottom: 0;
}

/* ================================================
   FILTER GROUP - Labels LEFT-ALIGNED
   ================================================ */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

/* Span 2 columns for Classification, Group Name, SubClass1, SubClass2 */
.filter-group.span-2 {
    grid-column: span 2;
}

.filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    padding-left: 0;
    width: auto;
}

/* "to" label styling - smaller, lighter */
.filter-group label.to-label {
    color: #94a3b8;
    text-transform: lowercase;
    font-weight: 500;
}

.theme-dark .filter-group label {
    color: #94a3b8;
}

.theme-dark .filter-group label.to-label {
    color: #64748b;
}

/* Select dropdowns */
.filter-group select {
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1f2937;
    width: 100%;
    height: 46px;
    box-sizing: border-box;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.filter-group select:hover {
    border-color: #94a3b8;
}

.theme-dark .filter-group select {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

.theme-dark .filter-group select:focus {
    border-color: #60a5fa;
}

/* Input fields (Date Range & Amount) */
.filter-group input[type="text"],
.filter-group input[type="number"] {
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1f2937;
    width: 100%;
    height: 46px;
    box-sizing: border-box;
}

.filter-group input[type="text"]:focus,
.filter-group input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.theme-dark .filter-group input[type="text"],
.theme-dark .filter-group input[type="number"] {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

/* ================================================
   SEARCH HIGHLIGHT STYLES
   ================================================ */
.search-highlight {
    background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-dark .search-highlight {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #1f2937;
}

/* ================================================
   FILTER ACTIVE STATE INDICATORS
   ================================================ */
.filter-group select.filter-active,
.filter-group input.filter-active {
    border-color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.1) !important;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */
@media (max-width: 1200px) {
    .filter-dropdowns-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filter-group.span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .filter-dropdowns-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .contact-filter-section {
        padding: 16px;
    }
    
    .filter-dropdowns-row {
        grid-template-columns: 1fr;
    }
    
    .filter-group.span-2 {
        grid-column: span 1;
    }
}
