/* Minification failed. Returning unminified contents.
(1450,13): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(1643,13): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
 */
/* AI Chat Court Research Styles - Extracted from AiChatCourtResearch.cshtml */

    #court-practice-container {
        display: flex;
        flex-direction: row;
        height: 100vh;
        width: 100%;
        color: #fff;
        overflow: hidden;
        position: relative; /* Required for absolute positioning of loading overlay */
    }

    /* Leva stran - iskalnik in filtri */
    .court-practice-search-sidebar {
        width: 380px;
        min-width: 380px;
        max-width: 380px;
        background-color: #1a1a1a;
        border-right: 1px solid #3a3a3a;
        overflow-y: auto;
        padding-bottom: 100px;
        height: 100vh;
        box-sizing: border-box;
        flex-shrink: 0;
        transition: all 0.3s ease;
        position: relative;
    }

    /* EXPANDED STATE: Before results - wider sidebar for better filter UX */
    .court-practice-search-sidebar.expanded {
        width: 55vw !important;
        min-width: 550px !important;
        max-width: 900px !important;
    }
    
    /* MINIMIZED STATE: When results shown - narrower sidebar but still visible */
    .court-practice-search-sidebar.minimized {
        width: 350px; /* Narrower but still visible (was 70px) */
        min-width: 350px;
        overflow-y: auto; /* Allow scrolling */
    }

    /* Keep form visible in minimized state (don't hide it) */
    .court-practice-search-sidebar.minimized .court-practice-form,
    .court-practice-search-sidebar.minimized .court-practice-subtitle {
        opacity: 1; /* Keep visible (was 0) */
        pointer-events: auto; /* Keep interactive */
        transform: none; /* No animation */
    }

    /* EXPAND BUTTON - COMMENTED OUT (not needed anymore) */
    /*
    .court-sidebar-expand-btn {
        color: #b8b8b8;
        width: 70px;
        height: 64px;
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        z-index: 100;
    }

    .court-practice-search-sidebar.minimized .court-sidebar-expand-btn {
        display: flex;
    }

    .court-sidebar-expand-btn:hover {
        background-color: #272727;
        color: #51afea;
    }
    */

    /* ============================================================================
       SIDEBAR TABS STYLING
       ============================================================================ */
    .sidebar-tabs {
        display: flex;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        margin-bottom: 5px;
        background-color: #1a1a1a;
    }

    .tab-button {
        flex: 1;
        background: none;
        border: none;
        color: #b8b8b8;
        padding: 12px 16px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s;
        border-bottom: 3px solid transparent;
        position: relative;
    }

    .tab-button:hover {
        color: #fff;
        background-color: #333333;
    }

        .tab-button.active {
            color: #51afea;
            border-bottom-color: #51afea;
            background-color: #272727;
        }

    .tab-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 10px 20px;
    }

    .tab-pane {
        display: none;
        flex: 1;
        flex-direction: column;
    }

    .tab-pane.active {
        display: flex;
    }

    /* Adjust minimized state - KEEP TABS VISIBLE (changed from opacity: 0) */
    .court-practice-search-sidebar.minimized .sidebar-tabs,
    .court-practice-search-sidebar.minimized .tab-content {
        opacity: 1; /* Keep visible (was 0) */
        pointer-events: auto; /* Keep interactive (was none) */
        transform: none; /* No animation (was translateX(-20px)) */
    }

    /* Court search history styling - restored to original position */
    .court-search-history{
        overflow-y: scroll;
    }

    /* court-search-history-item base styles defined in COURT SEARCH HISTORY STYLES section below */
    
    .court-session-bookmark {
        background: none;
        border: none;
        color: #b8b8b8;
        padding: 5px;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.2s;
    }
    
    .court-session-bookmark:hover {
        background-color: #333333;
        color: #51afea;
    }
    
    .court-session-bookmark.bookmarked {
        color: #ffc107;
    }
    
    .court-session-bookmark.bookmarked:hover {
        color: #fff;
    }


    .court-practice-subtitle {
        font-size: 14px;
        color: #b8b8b8;
        margin-bottom: 15px;
    }
    .court-practice-input-filter{
        margin: 5px 0px;
    }
    /* Iskalni obrazec */
    .court-practice-form {
        display: flex;
        flex-direction: column;
    }

    .court-practice-input-wrapper {
        position: relative;
        display: block;
        margin-bottom: 15px;
        margin-top: 15px;
        padding: 8px;
    }

    .court-practice-search-input {
        width: 100%;
        background-color: #333333;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        color: #fff;
        font-size: 15px;
        box-sizing: border-box;
        padding: 12px 40px 12px 12px;
        line-height: 1.4;
        min-height: 40px;
        max-height: 120px;
        resize: none;
        overflow-y: hidden;
        transition: height 0.2s ease-out;
    }

        .court-practice-search-input:focus {
            outline: none;
        }

        .court-practice-search-input::placeholder {
            color: #b8b8b8;
        }

    .court-practice-search-button {
        position: absolute;
        right: 10px;
        top: 12px;
        background: none;
        border: none;
        color: #b8b8b8;
        cursor: pointer;
        padding: 4px;
        line-height: 1;
    }

        .court-practice-search-button:hover {
            color: #51afea;
        }

    /* Filtri */
    .court-practice-filters {
        display: flex;
        flex-direction: column;
    }

    .court-practice-filter-section {
        padding: 0px;
        margin-bottom: 8px;
        
    }

        .court-practice-filter-section:last-child {
            border-bottom: none;
            display: flex;
            gap: 12px;
            align-items: center;
            justify-content: center;
            padding: 20px 0px;
        }

        .court-practice-filter-section h3 {
            font-size: 16px;
            font-weight: 500;
            margin: 0px 0px 12px 0px;
            color: #fff;
            line-height: 1.4;
        }

    .court-session-edit,
    .court-session-delete,
    .court-session-bookmark {
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        border-radius: 4px;
        transition: all 0.2s;
        color: #b8b8b8;
    }


        .court-session-edit:hover,
        .court-session-delete:hover,
        .court-session-bookmark:hover {
            background-color: #333333;
            color: #51afea;
        }


        .court-session-bookmark.bookmarked {
            color: #ff9800;
        }

    /* Datumski filter */
    .court-practice-date-filter {
        display: flex;
        gap: 10px;
    }

    .court-practice-date-from,
    .court-practice-date-to {
        flex: 1;
    }

        .court-practice-date-from label,
        .court-practice-date-to label {
            display: block;
            font-size: 13px;
            color: #b8b8b8;
            margin-bottom: 5px;
        }

            .court-practice-date-from label small,
            .court-practice-date-to label small {
                font-size: 11px;
                color: #6b6b6b;
                font-weight: normal;
            }

    /* Legacy input styling - updated to use unified system */
    .court-practice-year-input,
    .court-practice-text-input,
    .court-practice-date-input {
        width: 100%;
        height: 44px;
        background-color: #333333;
        border: 2px solid #4c4c4c;
        border-radius: 8px;
        padding: 10px 35px 10px 12px;
        color: #fff;
        font-size: 14px;
        box-sizing: border-box;
        transition: all 0.2s ease;
        outline: none;
    }
    
    .court-practice-year-input:focus,
    .court-practice-text-input:focus,
    .court-practice-date-input:focus {
        background: #454545;
        box-shadow: 0 0 0 3px rgba(81, 175, 234, 0.1);
    }

    .court-practice-date-input::-webkit-calendar-picker-indicator {
        filter: invert(1);
        cursor: pointer;
    }

    /* Izbira zakona in člena */
    .court-practice-law-filter {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .court-practice-select-wrapper {
        position: relative;
        width: 100%;
    }

    .court-practice-select {
        width: 100%;
        background-color: #333333;
        border: 1px solid #4c4c4c;
        border-radius: 4px;
        padding: 8px 10px;
        color: #fff;
        appearance: none;
        box-sizing: border-box;
    }

    .court-practice-select-wrapper::after {
        content: '▼';
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        pointer-events: none;
        font-size: 12px;
        color: #b8b8b8;
    }

    /* Court Source Selection - AiChatBase Style */
    .court-sources-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 12px;
        margin-bottom: 20px;
        max-width: 850px;
    }

    .court-source-card {
        position: relative;
        padding: 12px 16px;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        background: #333333;
        cursor: pointer;
        transition: all 0.2s ease;
        user-select: none;
        min-height: 70px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .court-source-card:hover {
        background: #4a4a4a;
    }

    .court-source-card.selected {
        background: #3d8ac7;
        color: white;
    }

    .court-source-card.selected:hover {
        background: #51afea;
    }

    /* Subtle Court Type Indicators - AiChatBase Style */
    .court-source-card[data-court-type="constitutional"] {
        border-left: 3px solid #dc3545;
    }

    .court-source-card[data-court-type="supreme"] {
        border-left: 3px solid #28a745;
    }

    .court-source-card[data-court-type="administrative"] {
        border-left: 3px solid #ffc107;
    }

    .court-source-card[data-court-type="higher"] {
        border-left: 3px solid #6f42c1;
    }

    .court-source-card[data-court-type="district"] {
        border-left: 3px solid #17a2b8;
    }

    .court-source-card-header {
        display: flex;
        align-items: center;
        margin-bottom: 6px;
    }

    .court-source-card-icon {
        font-size: 20px;
        margin-right: 10px;
        opacity: 0.8;
    }

    .court-source-card.selected .court-source-card-icon {
        opacity: 1;
    }

    .court-source-card-title {
        font-size: 13px;
        font-weight: 500;
        color: #fff;
        line-height: 1.3;
        flex: 1;
    }

    .court-source-card.selected .court-source-card-title {
        color: white;
        font-weight: 600;
    }

    .court-source-card-count {
        font-size: 11px;
        color: #b8b8b8;
        margin-top: 4px;
    }

    .court-source-card.selected .court-source-card-count {
        color: rgba(255, 255, 255, 0.8);
    }

    .court-source-card-checkbox {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 18px;
        height: 18px;
        opacity: 0;
        pointer-events: none;
    }

    .court-source-card.selected .court-source-card-checkbox {
        opacity: 1;
    }

    /* Bulk Actions - AiChatBase Style */
    .court-sources-bulk-actions {
        display: flex;
        gap: 6px;
        margin-bottom: 12px;
        justify-content: flex-end;
    }

    .court-bulk-action-btn {
        background: #333333;
        border: 1px solid #4c4c4c;
        color: #b8b8b8;
        padding: 6px 12px;
        border-radius: 4px;
        font-size: 11px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .court-bulk-action-btn:hover {
        background: #4a4a4a;
        border-color: #51afea;
        color: #fff;
    }

    /* ============================================
       NEW SEARCH TAB UX - Following AI Search Pattern
       ============================================ */

    /* Search Form Container */
    .court-search-form {
        display: flex;
        flex-direction: column;
        gap: 0;
        height: 100%;
        position: relative; /* Required for loading overlay positioning */
    }

    /* Search Input Wrapper (Like .ai-search-input-wrapper) */
    .court-search-input-wrapper {
        background-color: #333333;
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 1rem;
        box-shadow: rgba(0, 0, 0, 0.12) 0px 8px 35px 0px;
        padding: 12px;
    }

    /* Source Tags Container - includes search button */
    .court-search-tagged-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
        margin-bottom: 0;
        flex-wrap: wrap;
    }

    .court-search-tagged-container {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        flex: 1 1 auto;
        min-width: 0;
        align-items: center;
    }

    /* Keep buttons together and always visible */
    .court-search-btn-group {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
        margin-left: auto;
    }

    /* Empty state message when no filters selected */
    .court-no-filters-message {
        color: #6b6b6b;
        font-size: 12px;
        font-style: italic;
    }

    /* Individual Source Tag */
    .court-source-tag {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px;
        background: #333333;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        font-size: 11px;
        color: #fff;
        transition: all 0.2s ease;
    }

    .court-source-tag:hover {
        border-color: #51afea;
    }

    .court-source-tag-text {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .court-source-tag-count {
        color: #9c9c9c;
        font-size: 10px;
    }

    .court-source-tag-remove {
        cursor: pointer;
        color: #9c9c9c;
        font-size: 14px;
        line-height: 1;
        transition: color 0.2s ease;
        margin-left: 2px;
    }

    .court-source-tag-remove:hover {
        color: #ff6b6b;
    }

    .court-source-tag-placeholder {
        color: #6b6b6b;
        font-size: 12px;
        font-style: italic;
    }

    /* Search Input Container - Full width, no background */
    .court-search-input-container {
        display: block;
    }

    .court-search-textarea {
        width: 100%;
        height: 28px;
        min-height: 28px;
        max-height: 84px; /* 3 lines */
        background: transparent;
        border: none;
        color: #fff;
        font-size: 14px;
        font-family: inherit;
        line-height: 1.4;
        resize: none;
        overflow-y: hidden;
        padding: 4px 0;
        box-sizing: border-box;
    }

    .court-search-textarea:focus {
        outline: none;
    }

    .court-search-textarea::placeholder {
        color: #6b6b6b;
    }

    /* Inline Search Button - Matches ai-search-input-textarea-btn from AiChatBase */
    .court-search-btn-inline {
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 2.5rem;
        width: 2.5rem;
        padding: 0.5rem;
        background-color: #51afea;
        border: none;
        border-radius: 0.5rem;
        color: #fff;
        cursor: pointer;
        transition: 0.3s;
        user-select: none;
    }

    .court-search-btn-inline:not(:disabled):hover {
        opacity: 0.8;
    }

    .court-search-btn-inline:disabled {
        background: #4c4c4c;
        cursor: not-allowed;
        opacity: 0.5;
    }

    /* Reset Button - same size as search, different hover color */
    .court-reset-btn {
        background-color: transparent;
        position: relative;
    }

    .court-reset-btn:not(:disabled):hover {
        background-color: rgba(81, 175, 234, 0.15);
        color: #51afea;
    }

    /* Tooltip for reset button */
    .court-reset-btn::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 8px;
        background: #333333;
        color: #fff;
        font-size: 11px;
        white-space: nowrap;
        border-radius: 4px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s, visibility 0.2s;
        pointer-events: none;
        margin-bottom: 4px;
    }

    .court-reset-btn:hover::after {
        opacity: 1;
        visibility: visible;
    }

    /* Search Section */
    .court-search-section {
        padding: 12px;
    }

    .court-search-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .court-search-section-title {
        font-size: 13px;
        font-weight: 500;
        color: #fff;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .court-search-section-title svg {
        color: #9c9c9c;
    }

    /* Source Actions (Select All / Clear) */
    .court-source-actions {
        display: flex;
        gap: 8px;
    }

    /* Toggle Button for Select/Deselect All - Plain text style matching section title */
    .court-source-toggle-btn {
        padding: 0;
        font-size: 13px;
        font-weight: 400;
        background: transparent;
        border: none;
        color: #9c9c9c;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .court-source-toggle-btn:hover {
        color: #ffffff;
    }

    /* Active state - all selected */
    .court-source-toggle-btn.active {
        color: #9c9c9c;
    }

    .court-source-toggle-btn.active:hover {
        color: #ffffff;
    }

    /* Compact Source List - Flex wrap layout */
    .court-source-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Compact Source Item - Simple minimalistic style */
    .court-source-item {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        background: #363636;
        border: 1px solid #4c4c4c;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.15s ease;
        user-select: none;
    }

    .court-source-item:hover {
        border-color: #51afea;
        background: #333333;
    }

    .court-source-item.active {
        background: #3d8ac7;
        border-color: #3d8ac7;
    }

    /* Hide checkmark - minimalistic design */
    .court-source-checkmark {
        display: none;
    }

    /* Source Name */
    .court-source-name {
        font-size: 12px;
        font-weight: 400;
        color: #e0e0e0;
        white-space: nowrap;
    }

    .court-source-item.active .court-source-name {
        color: #fff;
        font-weight: 500;
    }

    /* Hidden checkbox */
    .court-source-item input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    /* Sources section compact spacing */
    .court-sources-section {
        padding: 10px 12px;
    }

    .court-sources-section .court-search-section-header {
        margin-bottom: 8px;
    }

    /* SKUPNO - subtle inline beside Viri */
    .court-sources-skupno {
        font-weight: normal;
        color: #9c9c9c;
        margin-left: 4px;
    }

    .court-sources-skupno:empty {
        display: none;
    }

    /* Bottom Action Buttons */
    .court-search-actions {
        display: flex;
        gap: 12px;
        justify-content: center;
        padding: 16px 12px;
        border-top: 1px solid #4c4c4c;
        margin-top: auto;
    }

    /* Legacy checkbox elements - keeping for compatibility */
    .court-practice-checkbox-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        max-width: 750px;
    }

    .court-practice-checkbox-item {
        display: flex;
        align-items: center;
    }

        .court-practice-checkbox-item input[type="checkbox"] {
            margin-right: 10px;
            accent-color: #51afea;
            border-color: #51afea;
            position: relative;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            border: 2px solid #51afea;
            border-radius: 3px;
            width: 18px;
            height: 18px;
            cursor: pointer;
            padding: 6px;
            outline: none;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
            transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
            box-sizing: border-box;
            vertical-align: middle;
            display: inline-block !important;
        }
            .court-practice-checkbox-item input[type="checkbox"]:checked {
                background-color: #51afea;
                border-color: #51afea;
            }

    .court-practice-count {
        margin-left: auto;
        font-size: 12px;
        color: #ffffff;
        font-weight: 500;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        min-width: 20px;
        padding: 2px;
        opacity: 0.8;
    }

    /* PHASE 5: Smooth Visual States for Ultra-Responsive UX */
    .court-practice-count .counting {
        color: #51afea;
        font-weight: 500;
        position: relative;
        animation: pulse 2s infinite;
    }

    .court-practice-count .updating {
        color: #51afea;
        transform: scale(1.05);
        font-weight: 600;
    }

    .court-practice-count .final {
        color: #b8b8b8;
        animation: count-appear 0.3s ease-out;
    }

    .court-practice-count .error {
        color: #f44336;
        font-weight: 500;
        animation: shake 0.5s ease-in-out;
    }

    /* Total count animations */
    #selected-archives-total-count .counting {
        color: #51afea;
        font-weight: 500;
        animation: pulse 2s infinite;
    }

    #selected-archives-total-count .error {
        color: #f44336;
        font-weight: 500;
    }

    .results-counter {
        transition: all 0.2s ease-out;
    }

    /* Smooth animations */
    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.6; }
    }

    @keyframes count-appear {
        from { 
            opacity: 0; 
            transform: translateY(-5px); 
        }
        to { 
            opacity: 1; 
            transform: translateY(0); 
        }
    }

    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
    }

    /* 2-Step Workflow Styles */
    .court-step-container {
        margin-bottom: 24px;
    }

    .court-step-header {
        display: flex;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #3a3a3a;
    }

    .court-step-number {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-color: #3a3a3a;
        color: #b8b8b8;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        margin-right: 12px;
        font-size: 14px;
        border: 2px solid #3a3a3a;
        transition: all 0.3s ease;
    }

    .court-step-number.active {
        background-color: #1485cc;
        color: white;
        border-color: #1485cc;
    }

    .court-step-number.completed {
        background-color: #28a745;
        color: white;
        border-color: #28a745;
    }

    .court-step-title {
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        flex: 1;
    }

    /* Step content container - position: relative for loading overlay */
    .court-step-content {
        position: relative; /* Required for absolute positioning of #court-filters-loading-overlay */
    }

    .court-step-content.disabled {
        opacity: 0.5;
        pointer-events: none;
    }

    /* Step validation styles */
    .court-step-validation {
        background-color: #2a3f54;
        border: 1px solid #1485cc;
        border-radius: 6px;
        padding: 12px 16px;
        margin-top: 16px;
        font-size: 14px;
        color: #b3d9ff;
    }

    .court-step-validation.error {
        background-color: #4a2c2c;
        border-color: #dc3545;
        color: #ffb3b3;
    }

    /* Progress button */
    .court-step-next-btn {
        background-color: #1485cc;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        margin-top: 16px;
        transition: all 0.2s;
        opacity: 0.6;
        pointer-events: none;
    }

    .court-step-next-btn.enabled {
        opacity: 1;
        pointer-events: auto;
    }

    .court-step-next-btn.enabled:hover {
        background-color: #0d6ba8;
        transform: translateY(-1px);
    }

    .court-practice-loading-content {
        padding: 40px;
        border-radius: 12px;
        text-align: center;
        color: #fff;
        max-width: 300px;
        width: 100%;
    }

    /* Scale Icon Container */
    .court-icon-container {
        position: relative;
        display: inline-block;
        margin-bottom: 20px;
    }

        .court-icon-container.search-success {
            animation: successPulse 0.6s ease-out;
        }


    /* Loading Text */
    .court-search-text {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #fff;
    }

    .court-search-subtext {
        font-size: 14px;
        color: #b8b8b8;
        margin: 0;
    }

    /* Results counter animation */
    .results-counter {
        font-size: 16px;
        color: #51afea;
        font-weight: 600;
        margin-top: 10px;
        animation: fadeInUp 0.5s ease-out;
    }

    /* Animations */
    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    @keyframes float {
        0%, 100% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-6px);
        }
    }

    @keyframes successPulse {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.1);
        }

        100% {
            transform: scale(1);
        }
    }

    @keyframes fadeInUp {
        0% {
            opacity: 0;
            transform: translateY(20px);
        }

        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }


    /* Gumbi */
    .court-practice-button-primary {
        width: 100%;
        background-color: #51afea;
        color: white;
        border: none;
        border-radius: 6px;
        padding: 10px 15px;
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.2s;
    }

        .court-practice-button-primary:hover {
            background-color: #3a9cda;
        }

    .court-practice-button-secondary {
        width: 100%;
        background-color: transparent;
        color: #b8b8b8;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        padding: 10px 15px;
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
    }

        .court-practice-button-secondary:hover {
            background-color: #333333;
            color: #fff;
        }

    /* Main content area - flexible layout */
    .court-practice-main-content {
        flex: 1;
        display: flex;
        height: 100vh;
        position: relative;
        min-width: 0; /* Prevent flex item from overflowing */
    }
    
    /* Welcome state - center area */
    .court-practice-welcome-container {
        overflow-y: auto; /* Allow scrolling if content too tall */
        overflow-x: hidden;
    }

    .court-practice-welcome {
        width: 100%;
        overflow-y: auto; /* Enable scrolling for tall content */
        overflow-x: hidden;
    }

    .court-welcome-wrapper {
        text-align: center;
        padding: 60px 40px;
        color: #fff;
        max-width: 900px;
    }

    .court-welcome-header {
        margin-bottom: 50px;
    }

    .court-welcome-header h2 {
        margin: 20px 0 15px 0;
        color: #fff;
        font-size: 28px;
        font-weight: 600;
    }

    .court-welcome-header p {
        color: #b8b8b8;
        margin: 0;
        font-size: 16px;
        line-height: 1.6;
    }

    .court-welcome-content {
        text-align: left;
        max-width: 700px;
        margin: 0 auto;
    }

    .court-welcome-info-box {
        border-radius: 12px;
        padding: 30px 35px;
        border: 1px solid #4c4c4c;
    }

    .court-welcome-info-box h3 {
        color: #51afea;
        margin: 0 0 25px 0;
        font-size: 18px;
        font-weight: 600;
    }

    .court-welcome-steps {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .court-welcome-step {
        display: flex;
        gap: 15px;
        align-items: start;
    }

    .court-welcome-step-number {
        background: #3d8ac7;
        color: #fff;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        flex-shrink: 0;
        font-size: 16px;
    }

    .court-welcome-step strong {
        color: #fff;
        font-size: 15px;
    }

    .court-welcome-step p {
        color: #b0b0b0;
        margin: 6px 0 0 0;
        font-size: 14px;
        line-height: 1.5;
    }

    .court-welcome-tip-box {
        margin-top: 25px;
        padding: 20px;
        background: rgba(82, 175, 234, 0.1);
        border-radius: 8px;
        border: 1px solid rgba(82, 175, 234, 0.3);
    }

    .court-welcome-tip-box p {
        color: #51afea;
        margin: 0;
        font-size: 14px;
        line-height: 1.6;
    }

    /* 🎯 RESPONSIVE: Smaller screens (MacBook Pro 14", laptops ~900-1000px height) */
    @media (max-height: 1000px) {
        .court-welcome-wrapper {
            padding: 30px 30px; /* Reduced from 60px 40px */
        }

        .court-welcome-header {
            margin-bottom: 25px; /* Reduced from 50px */
        }

        .court-welcome-header h2 {
            font-size: 24px; /* Reduced from 28px */
            margin: 15px 0 10px 0; /* Reduced margins */
        }

        .court-welcome-header p {
            font-size: 15px; /* Reduced from 16px */
        }

        .court-welcome-info-box {
            padding: 20px 25px; /* Reduced from 30px 35px */
        }

        .court-welcome-info-box h3 {
            margin: 0 0 15px 0; /* Reduced from 25px */
            font-size: 16px; /* Reduced from 18px */
        }

        .court-welcome-steps {
            gap: 12px; /* Reduced from 20px */
        }

        .court-welcome-step-number {
            width: 28px; /* Reduced from 32px */
            height: 28px;
            font-size: 14px; /* Reduced from 16px */
        }

        .court-welcome-step strong {
            font-size: 14px; /* Reduced from 15px */
        }

        .court-welcome-step p {
            font-size: 13px; /* Reduced from 14px */
            line-height: 1.4; /* Reduced from 1.5 */
        }

        .court-welcome-tip-box {
            margin-top: 15px; /* Reduced from 25px */
            padding: 15px; /* Reduced from 20px */
        }

        .court-welcome-tip-box p {
            font-size: 13px; /* Reduced from 14px */
        }
    }

    /* 🎯 RESPONSIVE: Even smaller screens (~800px height) */
    @media (max-height: 850px) {
        .court-welcome-wrapper {
            padding: 20px 20px; /* Further reduced */
        }

        .court-welcome-header {
            margin-bottom: 15px; /* Further reduced */
        }

        .court-welcome-header h2 {
            font-size: 22px;
            margin: 10px 0 8px 0;
        }

        .court-welcome-steps {
            gap: 10px; /* Further reduced */
        }

        .court-welcome-info-box {
            padding: 15px 20px; /* Further reduced */
        }
    }

    /* Welcome state - center area - KEEP EXISTING STYLES */
    .court-practice-welcome-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.5s ease;
    }
    
    .court-practice-welcome-container.hidden {
        display: none;
    }
    
    /* Results layout - 3 columns after sidebar */
    .court-practice-results-layout {
        flex: 1;
        display: none;
        height: 100vh;
    }

    .court-practice-results-layout.active {
        display: flex;
    }

    /* Tablet tabs - hidden on desktop */
    .results-summary-tabs {
        display: none;
    }

    /* Mobile menu toggle - hidden on desktop */
    .mobile-menu-toggle {
        display: none;
    }

    .mobile-overlay {
        display: none;
    }
    
    /* Individual columns in results layout */
    .court-results-column {
     /*   width: 450px;
        min-width: 450px;*/
        max-width: 450px;
        background-color: #1a1a1a;
        border-right: 1px solid rgba(255,255,255,0.08);
        overflow-y: auto;
        flex-shrink: 0;
        transition: all 0.3s ease;
    }
        .court-results-column::-webkit-scrollbar,
        .court-ai-summary-column::-webkit-scrollbar,
        .court-search-history::-webkit-scrollbar,
        .court-practice-search-sidebar::-webkit-scrollbar {
            height: 1rem;
            width: 0.5rem;
        }

        .court-results-column::-webkit-scrollbar-thumb,
        .court-ai-summary-column::-webkit-scrollbar-thumb,
        .court-search-history::-webkit-scrollbar-thumb,
        .court-practice-search-sidebar::-webkit-scrollbar-thumb {
            --tw-border-opacity: 1;
            background-color: #4c4c4c !important;
            border-color: rgba(255,255,255,0.2);
            border-radius: 9999px;
            border-width: 0px;
        }


        .court-results-column::-webkit-scrollbar-track,
        .court-ai-summary-column::-webkit-scrollbar-track,
        .court-search-history::-webkit-scrollbar-track,
        .court-practice-search-sidebar::-webkit-scrollbar-track {
            background-color: transparent;
            border-radius: 9999px;
        }

            .court-results-column::-webkit-scrollbar-track:hover,
            .court-ai-summary-column::-webkit-scrollbar-track:hover,
            .court-search-history::-webkit-scrollbar-track:hover,
            .court-practice-search-sidebar::-webkit-scrollbar-track:hover {
                background-color: transparent !important;
            }
    
    .court-ai-summary-column {
        flex: 1;
        min-width: 400px;
        /* NO max-width - take ALL remaining space! */
        padding-bottom: 50px;
        display: flex;
        flex-direction: column;
        overflow-y: scroll;
        overflow-x: hidden;
        transition: all 0.3s ease;
    }

    /* Court-specific override: Limit AI message width for better readability */
    .court-ai-summary-column .ai-chat-message-ai-wrap {
        max-width: calc(100% - 2rem);
    }

    .court-document-preview-column {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        overflow-y: auto;
        z-index: 2000;
        transition: right 0.3s ease;
        display: block;
        pointer-events: none;
    }

    .court-document-preview-column.active {
        right: 0;
        pointer-events: auto;
    }

    /* Inner content container for preview */
    .court-document-preview-inner {
        max-width: 1200px;
        margin: 0 auto;
        background-color: #1a1a1a;
        min-height: 100vh;
        border-left: 1px solid rgba(255,255,255,0.08);
        border-right: 1px solid rgba(255,255,255,0.08);
    }

    /* IMPORTANT: Prevent layout shift when preview opens */
    .court-practice-results-layout {
        position: relative;
    }

    .court-results-column,
    .court-ai-summary-column {
        position: relative;
        z-index: 1;
    }

    /* Keep columns at full width even when preview is active */
    .court-practice-results-layout.preview-active .court-results-column,
    .court-practice-results-layout.preview-active .court-ai-summary-column {
        width: inherit;
        min-width: inherit;
        max-width: inherit;
    }

    /* Loading overlay for results */
    .ai-court-results-loading {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(45, 45, 45, 0.9);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        border-radius: 8px;
    }

    .ai-court-results-loading.active {
        display: flex;
    }

    /* Loading overlay for filters (when changing entity types) - UNIFIED STYLING */
    #court-filters-loading-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(45, 45, 45, 0.7); /* Reduced from 0.9 for better animation visibility */
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
        display: flex; /* Always flex when created */
        justify-content: center;
        align-items: center;
        z-index: 1000;
        border-radius: 8px;
        animation: overlayFadeIn 0.2s ease-out;
        pointer-events: all !important; /* Block all clicks through overlay */
    }

    /* Block all interactions in container while loading */
    #step-1-content.is-loading {
        pointer-events: none;
    }

    #step-1-content.is-loading #court-filters-loading-overlay {
        pointer-events: all;
    }

    /* Disabled state for source items during loading */
    .court-source-item.disabled {
        pointer-events: none;
        opacity: 0.5;
    }

    /* Disabled state for inputs during loading */
    .court-filter-multiselect:disabled,
    .court-multiselect-input:disabled,
    input:disabled,
    select:disabled,
    button:disabled {
        pointer-events: none;
        opacity: 0.6;
    }

    @keyframes overlayFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Keep count animations visible through overlay */
    .court-practice-count {
        position: relative;
        z-index: 1001;
    }


    /* Spinning ring animation */
    .spinning-ring {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 40px;
        height: 40px;
        margin: -20px 0 0 -20px;
        border: 3px solid rgba(81, 175, 234, 0.3);
        border-top: 3px solid #51afea;
        border-radius: 50%;
        animation: spin 1s linear infinite !important;
        z-index: 1;
    }

 

    /* Document icon styling */
    .document-icon {
        position: relative;
        z-index: 2;
        color: #51afea;
    }

        .court-practice-results-column::-webkit-scrollbar {
            height: 1rem;
            width: 0.5rem;
        }

        .court-practice-results-column::-webkit-scrollbar-thumb {
            --tw-border-opacity: 1;
            background-color: #4c4c4c !important;
            border-color: rgba(255,255,255,0.2);
            border-radius: 9999px;
            border-width: 0px;
        }


        .court-practice-results-column::-webkit-scrollbar-track {
            background-color: transparent;
            border-radius: 9999px;
        }

            .court-practice-results-column::-webkit-scrollbar-track:hover {
                background-color: transparent !important;
            }


    .court-practice-results-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .court-practice-results-count {
        font-size: 15px;
        color: #b8b8b8;
    }

    .court-practice-results-sorting {
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .court-practice-results-sorting label {
            font-size: 14px;
            color: #b8b8b8;
        }

    .court-practice-sort-select {
        background-color: #333333;
        border: 1px solid #4c4c4c;
        border-radius: 4px;
        padding: 6px 10px;
        color: #fff;
        font-size: 14px;
    }

    /* Seznam rezultatov */
    .court-practice-results-list {
        width: 90%;
        max-width: 90%;
        flex-shrink: 0;
        padding-bottom: 80px;
        padding-top: 16px;
        margin: 0 auto;
    }

    #court-summary-messages {
        flex: 1;
        padding: 20px 24px;
        margin: 0;
        min-height: 300px;
        overflow-y: auto;
        overflow-y: auto !important;
        max-width: 100%;
    }

    /* Summary text readability - optimal line length */
    #court-summary-messages p,
    #court-summary-messages li {
        max-width: 900px;
    }

    #court-summary-messages h2,
    #court-summary-messages h3 {
        max-width: 900px;
    }

    .court-autocomplete-error {
        padding: 12px;
        text-align: center;
        color: #f44336;
        font-size: 14px;
    }
    /* Kompaktne kartice rezultatov */
    .court-practice-result-item {
        background-color: #333333;
        border-radius: 6px;
        padding: 15px;
        margin-bottom: 10px;
        border-left: 3px solid #51afea;
        cursor: pointer;
        transition: all 0.2s;
        border: 1px solid transparent;
    }

        .court-practice-result-item:hover {
            background-color: #454545;
            border-color: #51afea;
        }

        .court-practice-result-item.selected {
            background-color: #4a5568;
            border-color: #51afea;
        }

    .court-practice-result-header {
        margin-bottom: 8px;
    }

    .court-practice-result-title {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 5px;
    }

        .court-practice-result-title h3 {
            font-size: 16px;
            font-weight: 500;
            margin: 0;
            color: #fff;
            flex: 1;
            line-height: 1.3;
        }

    .court-practice-relevance-badge {
        padding: 2px 6px;
        border-radius: 8px;
        font-size: 11px;
        font-weight: 600;
        color: white;
        flex-shrink: 0;
    }

    .court-practice-result-meta {
        display: flex;
        gap: 10px;
        font-size: 12px;
        color: #b8b8b8;
        margin-bottom: 8px;
    }

    .court-practice-result-summary {
        font-size: 13px;
        color: #d1d5db;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Desni stolpec - predogled dokumenta */
    .court-practice-preview-column {
        flex: 1;
        background-color: #1a1a1a;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .court-practice-preview-header {
        padding: 20px;
        border-bottom: 1px solid #3a3a3a;
        background-color: #363636;
    }

    .court-practice-preview-title {
        font-size: 18px;
        font-weight: 600;
        color: #fff;
        margin: 0 0 10px 0;
    }

    .court-practice-preview-meta {
        display: flex;
        gap: 20px;
        font-size: 14px;
        color: #b8b8b8;
    }

    .court-practice-preview-content {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        background-color: #1a1a1a;
    }

    .court-practice-no-selection {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: #b8b8b8;
        text-align: center;
    }

        .court-practice-no-selection svg {
            margin-bottom: 20px;
            opacity: 0.5;
        }

    /* Preview actions */
    .court-practice-preview-actions {
        padding: 15px 20px;
        border-top: 1px solid #3a3a3a;
        background-color: #363636;
        display: flex;
        gap: 10px;
    }

    /* "Pogovor z rezultati" button - same style as ai-vault-header-btn ai-vault-primary */
    .court-practice-action-button {
        background: #3d8ac7;
        border: 1px solid #3d8ac7;
        color: white;
        border-radius: 6px;
        padding: 10px 16px;
        font-size: 14px;
        font-weight: bold;
        cursor: pointer;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        transition: all 0.2s;
    }

        .court-practice-action-button:hover {
            background: #51afea;
            border-color: #51afea;
        }

        .court-practice-action-button.primary {
            background: #3d8ac7;
            border-color: #3d8ac7;
        }

            .court-practice-action-button.primary:hover {
                background: #51afea;
            }

    /* Hide "Continue to chat" button by default - shown only when results arrive */
    #court-continue-to-chat {
        display: none; /* Hidden by default, shown via JavaScript when results rendered */
    }

    /* Loading stanje */
    .court-practice-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 200px;
        color: #b8b8b8;
    }
    /* Osnovni stili za autocomplete */
    .court-autocomplete-container {
        position: relative;
        width: 100%;
    }

    .court-autocomplete-input {
        width: 100%;
        background-color: #333333;
        border: 1px solid #4c4c4c;
        border-radius: 4px;
        padding: 8px 30px 8px 10px;
        color: #fff;
        font-size: 14px;
        box-sizing: border-box;
    }

        .court-autocomplete-input:focus {
            outline: none;
            border-color: #51afea;
        }

        .court-autocomplete-input::placeholder {
            color: #b8b8b8;
        }

    .court-autocomplete-clear {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #b8b8b8;
        cursor: pointer;
        font-size: 16px;
        width: 20px;
        height: 20px;
        display: none;
        align-items: center;
        justify-content: center;
    }

        .court-autocomplete-clear:hover {
            color: #fff;
        }

        .court-autocomplete-clear.visible {
            display: flex;
        }

    .court-autocomplete-dropdown {
        position: absolute;
        top: 100%;
        bottom: auto;
        left: 0;
        right: 0;
        background-color: #2a2a2a;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 6px;
        padding: 8px;
        max-height: 200px; /* V11: Reduced from 280px for compact display */
        overflow-y: auto;
        z-index: 99999; /* V11: High z-index to appear above everything */
        display: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        margin-top: 4px;
    }

    /* V11 FIX: Open upward when near bottom of viewport */
    .court-autocomplete-dropdown.open-up {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 4px;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3); /* Shadow goes upward */
    }

    /* 📱 MOBILE: Autocomplete dropdown full width (extend to screen edges) */
    body.body-mobile .court-autocomplete-wrapper {
        position: relative;
        width: calc(100% + 20px); /* Extend beyond parent padding */
        margin-left: -10px; /* Pull to left edge */
        margin-right: -10px; /* Pull to right edge */
    }

    body.body-mobile .court-autocomplete-dropdown {
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0; /* Square edges on mobile for full-width feel */
        border-left: none;
        border-right: none;
    }

        .court-autocomplete-dropdown.visible {
            display: block;
        }

    /* Custom scrollbar for autocomplete dropdown */
    .court-autocomplete-dropdown::-webkit-scrollbar {
        width: 8px;
    }

    .court-autocomplete-dropdown::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 4px;
    }

    .court-autocomplete-dropdown::-webkit-scrollbar-thumb {
        background: #4c4c4c;
        border-radius: 4px;
    }

        .court-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
            background: #4c4c4c;
        }

    .court-autocomplete-item {
        padding: 8px 12px;
        cursor: pointer;
        color: #e0e0e0;
        font-size: 14px;
        border-radius: 4px;
        transition: background-color 0.15s ease;
        margin-bottom: 2px;
    }

        .court-autocomplete-item:hover {
            background-color: #333333;
        }

        .court-autocomplete-item.selected {
            background-color: rgba(81, 175, 234, 0.15);
        }

    /* Autocomplete option item (generated dynamically in JS) */
    .court-autocomplete-option {
        display: flex;
        align-items: center;
        padding: 8px 12px;
        cursor: pointer;
        border-radius: 4px;
        transition: background-color 0.15s ease;
        color: #e0e0e0;
        font-size: 14px;
        gap: 10px;
        margin-bottom: 2px;
    }

        .court-autocomplete-option:hover {
            background: #333333;
        }

        .court-autocomplete-option.selected {
            background: rgba(81, 175, 234, 0.15);
        }

        /* Arrow key navigation highlight - must be visible like hover */
        .court-autocomplete-option.highlighted {
            background: #333333;
            outline: 1px solid #51afea;
        }

    /* Instruction text styling */
    .court-autocomplete-instruction {
        padding: 2px 12px;
        font-size: 12px;
        color: #b8b8b8;
        font-style: italic;
    }

    .court-autocomplete-option .option-text {
        flex: 1;
    }

    /* V8.9: Highlight matching text in search results */
    .court-autocomplete-option .option-text mark,
    .court-multiselect-option .option-text mark {
        background-color: rgba(81, 175, 234, 0.3);
        color: inherit;
        padding: 0 2px;
        border-radius: 2px;
    }

    .court-autocomplete-option .option-count {
        color: #b8b8b8;
        font-size: 12px;
        margin-left: auto;
    }

    .court-autocomplete-no-results {
        padding: 12px;
        text-align: center;
        color: #b8b8b8;
        font-size: 14px;
        font-style: italic;
    }

    .court-autocomplete-no-results .search-term {
        color: #51afea;
        font-weight: 500;
    }

    /* ============================================================================
       MULTISELECT FIELD STYLES (Autocomplete-style with multi-select chips)
       ============================================================================ */

    .court-filter-multiselect {
        margin-bottom: 16px;
        position: relative;
    }

    .court-multiselect-dropdown {
        position: absolute;
        top: 100%;
        bottom: auto;
        left: 0;
        right: 0;
        z-index: 99999; /* V11: High z-index to appear above everything */
        max-height: 200px; /* V11: Reduced from 280px for compact display */
        overflow-y: auto;
        background: #2a2a2a;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        margin-top: 4px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        display: none;
    }

    /* V11 FIX: Open upward when near bottom of viewport */
    .court-multiselect-dropdown.open-up {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 4px;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3); /* Shadow goes upward */
    }

    .court-multiselect-dropdown.visible {
        display: block;
    }

    /* Multi-select option - styled like source items (no checkbox visible) */
    .court-multiselect-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.15s ease;
        color: #e0e0e0;
        font-size: 14px;
        border: 1px solid transparent;
    }

    .court-multiselect-option:hover,
    .court-multiselect-option.highlighted {
        background: #333333;
        border-color: #51afea;
    }

    /* Selected state - solid blue like source items */
    .court-multiselect-option.selected {
        background: #3d8ac7;
        border-color: #3d8ac7;
        color: #fff;
    }

    .court-multiselect-option.selected:hover {
        background: #51afea;
        border-color: #51afea;
    }

    /* Hide checkbox - selection shown by background color */
    .court-multiselect-option input[type="checkbox"] {
        display: none;
    }

    /* Dropdown field container */
    .court-filter-dropdown-field {
        margin-bottom: 16px;
        position: relative;
    }

    /* Dropdown container wrapper */
    .court-dropdown-container {
        position: relative;
    }

    /* Dropdown toggle button */
    .court-dropdown-button {
        width: 100%;
        padding: 10px 12px;
        background: #2a2a2a;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        color: #b8b8b8;
        cursor: pointer;
        font-size: 14px;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.2s ease;
    }

        .court-dropdown-button:hover {
            border-color: #51afea;
            background: #353535;
        }

        .court-dropdown-button.active {
            background: #353535;
        }

        .court-dropdown-button.has-selection {
            color: #51afea;
            border-color: #51afea;
        }

    .court-dropdown-text {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .court-dropdown-arrow {
        margin-left: 8px;
        font-size: 10px;
        transition: transform 0.2s ease;
    }

    /* Dropdown options container */
    .court-dropdown-options {
        display: none;
        flex-direction: column;
        gap: 4px;
        max-height: 280px;
        overflow-y: auto;
        padding: 8px;
        background: #2a2a2a;
        border-radius: 6px;
        margin-top: 4px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

        .court-dropdown-options.visible {
            display: flex;
        }

    /* Custom scrollbar for dropdown */
    .court-dropdown-options::-webkit-scrollbar {
        width: 8px;
    }

    .court-dropdown-options::-webkit-scrollbar-track {
        background: #1a1a1a;
        border-radius: 4px;
    }

    .court-dropdown-options::-webkit-scrollbar-thumb {
        background: #4c4c4c;
        border-radius: 4px;
    }

        .court-dropdown-options::-webkit-scrollbar-thumb:hover {
            background: #5c5c5c;
        }

    /* Dropdown option item */
    .court-dropdown-option {
        display: flex;
        align-items: center;
        padding: 8px 12px;
        cursor: pointer;
        border-radius: 4px;
        transition: background-color 0.15s ease;
        color: #e0e0e0;
        font-size: 14px;
        gap: 10px;
    }

        .court-dropdown-option:hover {
            background: #333333;
        }

        .court-dropdown-option.selected {
            background: rgba(81, 175, 234, 0.15);
        }

    .court-dropdown-option-text {
        flex: 1;
    }

    .court-dropdown-option-count {
        color: #b8b8b8;
        font-size: 12px;
        margin-left: auto;
    }

    /* Use same checkbox styling as court-practice-checkbox-item */
    .court-dropdown-option input[type="checkbox"],
    .court-dropdown-option input[type="radio"] {
        margin-right: 10px;
        accent-color: #51afea;
        border-color: #51afea;
        position: relative;
        appearance: none;
        width: 18px;
        height: 18px;
        border: 2px solid #51afea;
        border-radius: 3px;
        background-color: transparent;
        cursor: pointer;
        transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
        box-sizing: border-box;
        vertical-align: middle;
        display: inline-block !important;
    }

    .court-dropdown-option input[type="checkbox"]:checked,
    .court-dropdown-option input[type="radio"]:checked {
        background-color: #51afea;
        border-color: #51afea;
    }

    /* Radio buttons should be round */
    .court-dropdown-option input[type="radio"] {
        border-radius: 50%;
    }

    .court-dropdown-label {
        flex: 1;
        user-select: none;
    }

    /* Loading */
    .court-autocomplete-loading {
        padding: 12px;
        text-align: center;
        color: #b8b8b8;
        font-size: 14px;
    }

    /* Responsive design */
    @media (max-width: 1400px) {
        .court-practice-search-sidebar {
            width: 360px;
            min-width: 360px;
            max-width: 360px;
        }

        .court-practice-search-sidebar.expanded {
            width: 50vw !important;
            min-width: 500px !important;
            max-width: 800px !important;
        }
/*
        .court-results-column {
            width: 400px;
            min-width: 400px;
        }*/

        .court-ai-summary-column {
            flex: 1;
            min-width: 350px;
            /* NO max-width */
        }

        .court-document-preview-column {
            width: 100%;
        }

        .court-document-preview-inner {
            max-width: 900px;
        }
    }

    @media (max-width: 1200px) {
        .court-practice-search-sidebar {
            width: 340px;
            min-width: 340px;
            max-width: 340px;
        }

        .court-practice-search-sidebar.expanded {
            width: 50vw !important;
            min-width: 450px !important;
            max-width: 700px !important;
        }

        /* Tablet - Tab System */
        .court-practice-results-layout {
            flex-direction: column;
            position: relative;
        }

        .results-summary-tabs {
            display: flex;
            border-bottom: 2px solid #3a3a3a;
            background: #2a2a2a;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .results-summary-tab {
            flex: 1;
            padding: 14px 16px;
            background: #2a2a2a;
            color: #b8b8b8;
            border: none;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
            border-bottom: 3px solid transparent;
        }

        .results-summary-tab:hover {
            background: #353535;
            color: #fff;
        }

        .results-summary-tab.active {
            color: #51afea;
            border-bottom-color: #51afea;
            background: #272727;
        }

        .court-results-column,
        .court-ai-summary-column {
            width: 100%;
            min-width: auto;
            max-width: none;
            display: none;
            height: calc(100vh - 60px);
        }

        .court-results-column.active,
        .court-ai-summary-column.active {
            display: block;
        }

        .court-document-preview-column {
            width: 100%;
        }

        .court-document-preview-inner {
            max-width: 100%;
        }
    }

    /* ============================================================================
       📱 MOBILE 3-TAB SYSTEM - FILTRI | REZULTATI | POVZETEK
       ============================================================================ */

    body.body-mobile #court-practice-container {
        flex-direction: column; /* Stack vertically on mobile */
        height: calc(100vh - 70px); /* Full height minus header */
        overflow: hidden;
    }

    /* 📱 MOBILE: Sidebar becomes first tab content (not drawer) */
    body.body-mobile .court-practice-search-sidebar {
        position: relative; /* NOT fixed */
        left: auto;
        top: auto;
        width: 100%;
        max-width: none;
        height: 100%; /* Full height to fill flex container */
        flex: 1 1 100%; /* Grow and shrink, basis 100% */
        overflow-y: auto;
        padding: 10px;
        box-shadow: none;
        display: none; /* Hidden by default */
    }

    /* Show sidebar when tab is active OR when welcome page hidden but before tabs appear */
    body.body-mobile .court-practice-search-sidebar.mobile-tab-active {
        display: block;
    }

    /* Show sidebar when "ZAČNI RAZISKOVANJE" clicked (before results) */
    body.body-mobile .court-practice-search-sidebar.mobile-filters-active {
        display: block;
    }

    /* 📱 MOBILE: Main content - always visible (contains welcome page too!) */
    body.body-mobile .court-practice-main-content {
        width: 100%;
        flex: 1;
        overflow-y: auto;
        display: block; /* Always visible - contains welcome page */
    }

    /* Show main content children based on tab or welcome state */
    body.body-mobile .court-practice-main-content > * {
        display: none; /* Hide all children by default */
    }

    /* Show welcome container by default (when no .hidden class) */
    body.body-mobile .court-practice-welcome-container {
        display: block;
    }

    /* Hide welcome page when .hidden class is added - MUST have higher specificity! */
    body.body-mobile .court-practice-welcome-container.hidden {
        display: none !important; /* !important to override display: block */
    }

    /* Show results/summary when mobile tab is active */
    body.body-mobile .court-practice-main-content.mobile-tab-active > .court-practice-results-layout {
        display: flex !important;
        flex-direction: column;
        height: 100%;
    }

    /* 📱 MOBILE: 3-tab navigation bar (FILTRI | REZULTATI | POVZETEK) */
    .court-mobile-tabs {
        display: none; /* Hidden by default on desktop and on welcome page */
    }

    /* Show tabs ONLY when results are active */
    body.body-mobile #court-practice-container.has-results .court-mobile-tabs {
        display: flex;
        background: #2a2a2a;
        border-bottom: 1px solid #4c4c4c;
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 0;
    }

    body.body-mobile .court-mobile-tab {
        flex: 1;
        padding: 14px 8px;
        background: transparent;
        border: none;
        color: #b8b8b8;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        border-bottom: 3px solid transparent;
        transition: all 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    body.body-mobile .court-mobile-tab svg {
        width: 20px;
        height: 20px;
    }

    body.body-mobile .court-mobile-tab.active {
        color: #51afea;
        border-bottom-color: #51afea;
    }

    body.body-mobile .court-mobile-tab:active {
        background: #333333;
    }

    /* 📱 MOBILE: Hide REZULTATI tab until results actually load */
    body.body-mobile .court-mobile-tab[data-mobile-tab="rezultati"] {
        display: none; /* Hidden by default */
    }

    /* Show REZULTATI tab only when results have loaded */
    body.body-mobile #court-practice-container.has-loaded-results .court-mobile-tab[data-mobile-tab="rezultati"] {
        display: flex; /* Show when results arrive */
        animation: tabSlideIn 0.3s ease-out; /* Smooth entrance */
    }

    @keyframes tabSlideIn {
        from {
            opacity: 0;
            transform: translateY(-4px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 📱 MOBILE: Show "Zapri filtre" button ONLY on mobile when in filters-only mode (before search) */
    .court-sidebar-close-btn {
        display: none; /* Hidden by default on desktop */
    }

    /* Show close button on mobile when filters are active (before search results) */
    body.body-mobile .court-practice-search-sidebar.mobile-filters-active .court-sidebar-close-btn {
        display: flex; /* Show as back button to return to welcome page */
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        margin: 0 12px 16px 12px; /* ✅ FIX: Add left/right margin to prevent cutoff */
        background: #3a3a3a;
        border: 1px solid #4c4c4c;
        border-radius: 8px;
        color: #51afea;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        width: calc(100% - 24px); /* ✅ FIX: Account for left/right margin */
        justify-content: center;
        transition: all 0.2s;
        box-sizing: border-box; /* ✅ FIX: Ensure proper width calculation */
    }

    body.body-mobile .court-practice-search-sidebar.mobile-filters-active .court-sidebar-close-btn:active {
        background: #2a2a2a;
        transform: scale(0.98);
    }

    body.body-mobile .court-practice-search-sidebar.mobile-filters-active .court-sidebar-close-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Hide old drawer elements on mobile (we use 3-tab system instead) */
    body.body-mobile .mobile-menu-toggle,
    body.body-mobile .mobile-overlay {
        display: none !important;
    }

    /* Hide tablet tabs - we have mobile tabs now */
    body.body-mobile .results-summary-tabs {
        display: none !important;
    }

    /* 📱 MOBILE: Start button on welcome page */
    .court-mobile-start-btn-container {
        display: none;
    }

    body.body-mobile .court-mobile-start-btn-container {
        display: flex;
        justify-content: center;
        margin-top: 32px;
        padding: 0 20px;
    }

    body.body-mobile .court-mobile-start-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 14px 28px;
        background: linear-gradient(135deg, #51afea 0%, #4199d4 100%);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 48px;
        width: 100%;
        max-width: 400px;
    }

    body.body-mobile .court-mobile-start-btn:active {
        transform: scale(0.98);
        background: linear-gradient(135deg, #4199d4 0%, #3a8ac4 100%);
    }

    /* 📱 MOBILE: Compact spacing for entity type cards/checkboxes */
    body.body-mobile .court-sources-cards {
        gap: 8px; /* Reduced from 12px */
        margin-bottom: 12px;
    }

    body.body-mobile .court-source-card {
        padding: 8px 12px; /* Reduced from 12px 16px */
        min-height: 50px; /* Reduced from 70px */
    }

    body.body-mobile .court-practice-checkbox-item {
        padding: 8px 12px; /* Reduced from default */
        min-height: 44px; /* Compact touch target */
    }

    body.body-mobile .court-practice-search-sidebar,
    body.body-mobile .court-practice-search-sidebar.expanded,
    body.body-mobile .court-practice-search-sidebar.minimized {
        /* On mobile, ignore desktop expand/minimize states - force full width */
        width: 100% !important;
        min-width: 100% !important;  /* Override desktop min-width: 550px */
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Mobile toggle button */
    body.body-mobile .mobile-menu-toggle {
        position: fixed;
        top: 80px; /* Below header (70px) + margin */
        left: 10px;
        z-index: 999;
        background: #3d8ac7;
        color: white;
        border: none;
        padding: 10px 16px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        transition: opacity 0.3s ease;
    }

    body.body-mobile .court-practice-search-sidebar.mobile-open ~ .mobile-menu-toggle {
        opacity: 0;
        pointer-events: none;
    }

    /* Mobile overlay */
    body.body-mobile .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.6);
        z-index: 99997; /* Below sidebar */
        display: none;
    }

    body.body-mobile .mobile-overlay.active {
        display: block;
    }

    body.body-mobile .court-document-preview-column {
        width: 100%;
    }

    body.body-mobile .court-document-preview-inner {
        max-width: 100%;
    }



    @media (max-width: 900px) {
        /* Only apply if body.body-mobile is NOT present */
        body:not(.body-mobile) .court-practice-search-sidebar {
            position: fixed;
            left: -100%;
            top: 0;
            height: 100vh;
            width: 85vw;
            max-width: 340px;
            transition: left 0.3s ease;
            z-index: 1000;
            overflow-y: auto;
            box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        }

        body:not(.body-mobile) .court-practice-search-sidebar.mobile-open {
            left: 0;
        }

        body:not(.body-mobile) .mobile-menu-toggle {
            position: fixed;
            top: 10px;
            left: 10px;
            z-index: 1001;
            background: #51afea;
            color: white;
            border: none;
            padding: 10px 16px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        body:not(.body-mobile) .mobile-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.6);
            z-index: 999;
            display: none;
        }

        body:not(.body-mobile) .mobile-overlay.active {
            display: block;
        }
    }

    /* Additional Responsive Media Queries for 2-Step Workflow */
    @media (max-width: 768px) {
        /* Smaller screens - stack sources in single column */
        .court-sources-grid {
            grid-template-columns: 1fr !important;
            gap: 10px;
        }
        
        .court-step-content {
            padding: 15px;
        }
        
        .court-step-header {
            padding: 12px 15px;
        }
        
        .court-progress-btn {
            width: 100%;
            margin-top: 12px;
        }
        
        .court-progress-btn.secondary {
            width: 100%;
            margin-right: 0;
            margin-bottom: 8px;
        }

        /* 📱 MOBILE (<768px): Sidebar uses drawer from 900px breakpoint */
        /* Sidebar drawer behavior is already defined in @media (max-width: 900px) */
        /* No need to override position here - let the drawer behavior work */

        /* Mobile: Sidebar takes full width when opened */
        .court-practice-search-sidebar.mobile-open {
            width: 100vw !important;
            max-width: none !important;
        }

        /* Only force column layout on very small mobile screens */
        #court-practice-container {
            flex-direction: row; /* Keep side-by-side on tablets */
        }
    }

    @media (max-width: 480px) {
        /* Very small mobile screens - force column layout */
        #court-practice-container {
            flex-direction: column !important;
        }
        
        /* Very small screens - more compact layout */
        .court-step-number {
            width: 28px;
            height: 28px;
            font-size: 14px;
            margin-right: 8px;
        }
        
        .court-step-title {
            font-size: 14px;
        }
        
        .court-source-item {
            padding: 6px 10px;
        }
        
        .court-source-item label {
            font-size: 12px;
        }
        
        .court-search-textarea {
            min-height: 100px !important;
            padding: 10px;
            font-size: 13px;
        }
        
        .court-examples {
            padding: 12px;
        }
        
        .court-examples-list li {
            font-size: 11px;
        }

        .court-practice-search-sidebar {
            padding: 16px;
        }
    }

    @media (min-width: 1200px) {
        /* Large screens - can handle more compact grid */
        .court-sources-grid {
            grid-template-columns: 1fr 1fr 1fr !important;
            gap: 15px;
        }
    }

    /* ============================================================================
       ENHANCED INPUT SYSTEM - Clear buttons, unified heights, focus states
       ============================================================================ */
    
    /* Standard input field wrapper with clear button */
    .court-input-wrapper {
        position: relative;
        display: inline-block;
        width: 100%;
    }
    
    /* Unified input field styling - 44px minimum height */
    .court-input-field {
        width: 100%;
        height: 44px;
        padding: 10px 35px 10px 12px;
        border: 2px solid #4c4c4c;
        border-radius: 8px;
        background: #333333;
        color: #fff;
        font-size: 14px;
        transition: all 0.2s ease;
        box-sizing: border-box;
        outline: none;
    }
    
    /* Enhanced focus state */
    .court-input-field:focus {
        border-color: #51afea;
        background: #454545;
        box-shadow: 0 0 0 3px rgba(81, 175, 234, 0.1);
    }
    
    /* Error state */
    .court-input-field.error {
        border-color: #f44336;
        background: #4a2c2c;
    }
    
    .court-input-field.error:focus {
        border-color: #f44336;
        box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
    }
    
    /* Loading state */
    .court-input-field.loading {
        background: #3a3a3a;
        color: #a8a8a8;
        cursor: wait;
    }
    
    /* Clear button styling */
    .court-input-clear {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        background: none;
        border: none;
        color: #b8b8b8;
        cursor: pointer;
        border-radius: 50%;
        display: none;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        transition: all 0.2s ease;
    }
    
    .court-input-clear:hover {
        background: rgba(244, 67, 54, 0.1);
        color: #f44336;
    }
    
    .court-input-clear.visible {
        display: flex;
    }
    



    /* ============================================================================
       LOADING STATES & VISUAL FEEDBACK
       ============================================================================ */
    
    /* Filter loading state */
    .court-filter-loading {
        position: relative;
        overflow: hidden;
    }
    
    .court-filter-loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(81, 175, 234, 0.3), transparent);
        animation: shimmer 1.5s infinite;
    }
    
    @keyframes shimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }
    
    /* Filter state indicators */
    .court-filter-indicator {
        position: absolute;
        top: 6px;
        right: 35px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: transparent;
        transition: all 0.2s ease;
    }
    
    .court-filter-indicator.active {
        background: #3d8ac7;
        box-shadow: 0 0 6px rgba(81, 175, 234, 0.3);
    }
    
    .court-filter-indicator.error {
        background: #f44336;
        box-shadow: 0 0 8px rgba(244, 67, 54, 0.5);
    }
    
    .court-filter-indicator.loading {
        background: #ffa500;
        animation: pulse-orange 1s infinite;
    }
    
    @keyframes pulse-orange {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
    }
    
    /* Selected filters visual feedback */
    .court-filter-selected {
        border-color: #51afea !important;
        background: #3a4a5a !important;
        box-shadow: 0 0 0 1px rgba(81, 175, 234, 0.3) !important;
    }
    
    .court-filter-selected .court-filter-indicator {
        background: #3d8ac7;
        box-shadow: 0 0 6px rgba(81, 175, 234, 0.4);
    }
    
    /* Error messages */
    .court-input-error-message {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #f44336;
        color: white;
        padding: 6px 12px;
        border-radius: 0 0 6px 6px;
        font-size: 12px;
        z-index: 10;
        display: none;
        animation: slideDown 0.2s ease;
    }
    
    .court-input-error-message.visible {
        display: block;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* ============================================================================
       ACTION BUTTONS STYLING
       ============================================================================ */
    
    .court-action-button {
        padding: 12px 20px;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        min-width: 140px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    
    .court-action-reset {
        background: transparent;
        color: #b8b8b8;
        border-color: #4c4c4c;
    }
    
    .court-action-reset:hover {
        background: #333333;
        color: #fff;
        border-color: #51afea;
    }

    /* Toggle filter button (VEČ/MANJ FILTROV) */
    .court-filter-toggle-btn:hover {
        background: #333333 !important;
        color: #fff !important;
        border-color: #51afea !important;
    }

    .court-filter-toggle-btn .toggle-icon {
        font-size: 16px;
        line-height: 1;
        font-weight: 400;
    }

    .court-action-search {
        background: #51afea;
        color: white;
        border-color: #51afea;
    }

        .court-action-search:hover {
            opacity: 0.8;
            cursor: pointer;
        }
    
    .court-action-search:active {
        transform: translateY(0);
    }

    /* ============================================================================
       PROGRESSIVE DISCLOSURE & HOVER ANIMATIONS
       ============================================================================ */
    
    /* Advanced filters toggle */
    .court-advanced-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        background: #353535;
        border: 1px solid #4c4c4c;
        border-radius: 8px;
        color: #b8b8b8;
        cursor: pointer;
        transition: all 0.3s ease;
        margin: 10px 0;
        font-size: 14px;
        gap: 8px;
    }
    
    .court-advanced-toggle:hover {
        background: #333333;
        border-color: #51afea;
        color: #51afea;
        transform: translateY(-1px);
    }
    
    .court-advanced-toggle.expanded {
        background: #51afea;
        color: white;
        border-color: #51afea;
    }
    
    .court-advanced-toggle-icon {
        transition: transform 0.3s ease;
    }
    
    .court-advanced-toggle.expanded .court-advanced-toggle-icon {
        transform: rotate(180deg);
    }
    
    /* Smooth reveal animation for advanced filters */
    .court-advanced-filters {
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease;
        padding: 0;
    }
    
    /* Enhanced hover effects */
    .court-source-card {
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .court-source-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* Button hover enhancements */
    .court-bulk-action-btn {
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .court-bulk-action-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(81, 175, 234, 0.2);
    }
    
    /* Input field micro-interactions */
    .court-input-field:hover:not(:focus) {
        border-color: #5a5a5a;
        background: #434343;
    }
    
    .court-filter-input:hover:not(:focus) {
        border-color: #5a5a5a;
        background: #434343;
    }
    
    /* Accessibility focus indicators - WCAG AA compliant */
    .court-input-field:focus-visible,
    .court-filter-input:focus-visible,
    .court-practice-search-input:focus-visible,
    .court-autocomplete-input:focus-visible {
        outline: 2px solid #51afea;
        outline-offset: 2px;
    }

    /* Checkbox focus indicators */
    .court-practice-checkbox-item input[type="checkbox"]:focus-visible,
    .court-dropdown-option input[type="checkbox"]:focus-visible,
    .court-dropdown-option input[type="radio"]:focus-visible {
        outline: 2px solid #51afea;
        outline-offset: 2px;
    }

    /* Entity type cards focus */
    .court-source-card:focus-visible {
        outline: 2px solid #51afea;
        outline-offset: 2px;
    }

    /* Button focus indicators */
    .court-action-search:focus-visible,
    .court-action-reset:focus-visible,
    .court-bulk-action-btn:focus-visible,
    .tab-button:focus-visible {
        outline: 2px solid #51afea;
        outline-offset: 2px;
    }

    /* ============================================================================
       SIMPLE FILTER SYSTEM - AiChatBase Style (brez accordion)
       ============================================================================ */

    .court-filters-simple {
        width: 100%;
        border-radius: 6px;
    }

    .court-filter-section-header-simple {
        display: flex;
        align-items: center;
        padding: 6px 10px;
        background: #333333;
        border-bottom: 1px solid #4c4c4c;
    }

    .court-filter-fields-grid-simple {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 6px;
        padding: 0;
    }

    /* Filter sections - full width with consistent padding */
    .court-filter-legal-base-section,
    .court-filter-text-section,
    .court-filter-date-section,
    .court-filter-dropdown-section {
        overflow: visible; /* Allow tooltips to escape container */
    }

    /* Legal Base pair - Kratica + Člen in 2-column grid */
    .court-filter-legal-base-pair {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-bottom: 8px;
    }

    .court-filter-date-section .court-filter-field,
    .court-filter-dropdown-section .court-filter-field {
        margin-bottom: 16px;
        width: 100%;
    }

    .court-filters-accordion {
        width: 100%;
        margin-bottom: 20px;
    }

    .court-filter-section {
        margin-bottom: 8px;
        border: 1px solid #4c4c4c;
        border-radius: 6px;
        background: #333333;
        overflow: hidden;
        transition: border-color 0.2s ease;
    }

    .court-filter-section:hover {
        border-color: #51afea;
    }

    .court-filter-section.expanded {
        border-color: #51afea;
        overflow: visible; /* Allow tooltips to escape when expanded */
    }

    .court-filter-section-header {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        cursor: pointer;
        user-select: none;
        background: #333333;
        transition: background-color 0.2s ease;
    }

    .court-filter-section-header:hover {
        background: #4a4a4a;
    }

    .court-filter-section.expanded .court-filter-section-header {
        background: #3d8ac7;
        color: white;
    }

    .court-filter-section-icon {
        font-size: 16px;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .court-filter-section-title {
        flex: 1;
        font-size: 14px;
        font-weight: 600;
        color: #e0e0e0;
    }

    .court-filter-section.expanded .court-filter-section-title {
        color: white;
    }

    .court-filter-section-count {
        font-size: 12px;
        color: #b8b8b8;
        margin-right: 12px;
    }

    .court-filter-section.expanded .court-filter-section-count {
        color: rgba(255, 255, 255, 0.8);
    }

    .court-filter-section-toggle {
        font-size: 12px;
        color: #b8b8b8;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    .court-filter-section.expanded .court-filter-section-toggle {
        transform: rotate(180deg);
        color: white;
    }

    .court-filter-section-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        background: #353535;
        border-top: 1px solid #4c4c4c;
    }

    .court-filter-section.expanded .court-filter-section-content {
        max-height: 1000px;
        padding: 12px;
        overflow: visible; /* Allow tooltips to escape when expanded */
    }

    .court-filter-fields-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 12px;
    }

    .court-filter-field {
        display: flex;
        flex-direction: column;
    }

    .court-filter-field-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2px;
    }

    .court-filter-label {
        font-size: 12px;
        font-weight: 500;
        color: #e0e0e0;
        margin-bottom: 0;
        display: block;
    }

    .court-filter-hint {
        font-size: 11px;
        color: #b8b8b8;
        font-style: italic;
    }

    /* Date field header actions (hint + clear button) */
    .court-date-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .court-date-clear {
        background: none;
        border: none;
        color: #6b6b6b;
        font-size: 16px;
        cursor: pointer;
        padding: 2px 6px;
        line-height: 1;
        transition: color 0.2s ease;
        border-radius: 4px;
    }

    .court-date-clear:hover {
        color: #ff6b6b;
        background: rgba(255, 107, 107, 0.1);
    }

    /* Filter label with tooltip container */
    .court-filter-label-wrapper {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 2px;
        overflow: visible; /* Allow tooltips to escape */
    }

    /* Tooltip icon button */
    .court-filter-tooltip-icon {
        width: 16px;
        height: 16px;
        background: #4c4c4c;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        color: #b8b8b8;
        cursor: help;
        position: relative;
        flex-shrink: 0;
        transition: all 0.2s ease;
    }

    .court-filter-tooltip-icon:hover {
        background: #3d8ac7;
        color: #fff;
    }

    /* Tooltip popup - high z-index to appear above all elements */
    .court-filter-tooltip-icon:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background: #1a1a1a;
        color: #fff;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        white-space: nowrap;
        z-index: 9999;
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        border: 1px solid #3a3a3a;
        pointer-events: none;
    }

    /* Tooltip arrow */
    .court-filter-tooltip-icon:hover::before {
        content: '';
        position: absolute;
        bottom: calc(100% + 2px);
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: #1a1a1a;
        z-index: 9999;
        pointer-events: none;
    }

    /* ============================================
       ACTIVE FILTERS BAR - Matches .ai-advanced-selected-sources
       ============================================ */

    /* Container - matches .ai-advanced-selected-sources */
    .court-active-filters {
        margin-bottom: 15px;
        padding: 15px;
        max-height: 200px;
        overflow-y: auto;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.08);
    }

    /* Scrollbar styling */
    .court-active-filters::-webkit-scrollbar {
        height: 1rem;
        width: 0.5rem;
    }

    .court-active-filters::-webkit-scrollbar-thumb {
        background-color: #4c4c4c !important;
        border-radius: 9999px;
    }

    .court-active-filters::-webkit-scrollbar-track {
        background-color: transparent;
    }

    /* Header */
    .court-active-filters-header {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: flex-start;
        margin-bottom: 10px;
    }

    /* Title with icon */
    .court-active-filters-title {
        font-size: 16px;
        font-weight: 500;
        color: #fff;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Reset button */
    .court-active-filters-reset {
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        transition: all 0.3s ease;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .court-active-filters-reset:hover {
        color: #6b6b6b;
    }

    /* Grid layout - 2 columns */
    .court-active-filters-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Individual filter item - matches .ai-advanced-source-item */
    .court-active-filter-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        background-color: #363636;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.08);
        font-size: 12px;
    }

    /* Filter info container */
    .court-active-filter-info {
        display: flex;
        align-items: center;
        overflow: hidden;
    }

    /* Category label (white, bold) */
    .court-active-filter-category {
        font-weight: 500;
        color: #fff;
        flex-shrink: 0;
    }

    /* Value (gray, truncated) */
    .court-active-filter-value {
        color: #9c9c9c;
        margin-left: 5px;
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Remove button */
    .court-active-filter-remove {
        cursor: pointer;
        color: #9c9c9c;
        font-size: 18px;
        line-height: 1;
        transition: color 0.2s;
        background: none;
        border: none;
        padding: 0;
        flex-shrink: 0;
    }

    .court-active-filter-remove:hover {
        color: #ff6b6b;
    }

    /* ============================================
       LOCKED FIELD INDICATORS - Only disable input, not label
       ============================================ */
    .court-filter-field.locked .court-filter-input,
    .court-filter-field.locked .court-dropdown-button,
    .court-filter-field.locked .court-date-input {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
        background: rgba(30, 30, 30, 0.3);
    }

    .court-filter-availability {
        font-size: 10px;
        color: #ffa500;
        font-weight: normal;
    }

    .court-filter-input {
        width: 100%;
        height: 44px;
        padding: 10px 35px 10px 12px;
        border: 2px solid #4c4c4c;
        border-radius: 8px;
        background: #333333;
        color: #fff;
        font-size: 14px;
        transition: all 0.2s ease;
        box-sizing: border-box;
        outline: none;
    }

    .court-filter-input:focus {
        border-color: #51afea;
        background: #454545;
        box-shadow: 0 0 0 3px rgba(81, 175, 234, 0.1);
    }

    .court-filter-input::placeholder {
        color: #a8a8a8;
        font-style: italic;
    }

    /* Date range specific styling */
    .court-filter-date-field .court-date-range {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .court-date-label {
        font-size: 11px;
        color: #bbb;
        margin-bottom: 4px;
        font-weight: 500;
    }

    .court-date-input {
        width: 100%;
        height: 44px;
        padding: 10px 12px;
        border: 2px solid #4c4c4c;
        border-radius: 8px;
        background: #333333;
        color: #fff;
        font-size: 14px;
        transition: all 0.2s ease;
        box-sizing: border-box;
        outline: none;
    }

    .court-date-input:focus {
        border-color: #51afea;
        background: #454545;
        box-shadow: 0 0 0 3px rgba(81, 175, 234, 0.1);
    }

    .court-date-input:hover:not(:focus) {
        border-color: #5a5a5a;
        background: #434343;
    }

    .court-date-input::placeholder {
        color: #a8a8a8;
        font-style: italic;
    }

    /* Autocomplete wrapper styling */
    .court-autocomplete-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .court-filter-clear {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #b8b8b8;
        font-size: 14px;
        cursor: pointer;
        padding: 4px;
        line-height: 1;
        transition: color 0.2s ease;
    }

    .court-filter-clear:hover {
        color: #51afea;
    }

    /* Responsive adjustments for filter accordion */
    @media (max-width: 768px) {
        .court-filter-fields-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }
        
        .court-filter-date-field .court-date-range {
            grid-template-columns: 1fr;
            gap: 8px;
        }
    }

    @media (max-width: 480px) {
        .court-filter-section-header {
            padding: 10px 12px;
        }
        
        .court-filter-section.expanded .court-filter-section-content {
            padding: 12px;
        }
        
        .court-filter-input {
            padding: 8px 10px;
            font-size: 12px;
        }
    }

    /* ============================================================================
       ANIMATIONS - Smooth transitions for all dynamic elements
       ============================================================================ */

    /* Cascade "falling down" animation for result cards */
    @keyframes cascadeIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Apply cascade animation to cards */
    .court-result-card {
        animation: cascadeIn 0.4s ease forwards;
        opacity: 0; /* Start hidden */
    }

    /* Smooth transitions for all visibility toggles */
    .tab-content,
    .court-filter-section-content,
    .court-practice-filters-container,
    .court-practice-results-layout,
    .court-ai-summary-panel {
        transition: all 0.3s ease;
    }

    /* Smooth transitions for form elements */
    .court-practice-form input,
    .court-practice-form textarea,
    .court-practice-form select,
    .court-filter-input,
    .court-autocomplete-wrapper {
        transition: all 0.3s ease;
    }

    /* Smooth transitions for buttons and interactive elements */
    .tab-button,
    .court-filter-section-header,
    .court-search-history-item,
    .court-practice-checkbox-item label {
        transition: all 0.3s ease;
    }

    /* ========================================================================
       🚀 MOBILE-SPECIFIC ENHANCEMENTS - Phase 1
       ======================================================================== */

    /* 📱 MOBILE PHONES (up to 640px) */
    @media (max-width: 640px) {
        /* 🎯 Touch-Friendly Autocomplete Options (48px minimum) */
        .court-autocomplete-option {
            padding: 14px 16px; /* Increased from 8px 12px */
            font-size: 16px; /* Prevent iOS zoom on focus */
            min-height: 48px; /* iOS Human Interface Guidelines */
        }

        .court-autocomplete-dropdown {
            max-height: 60vh !important; /* Responsive height instead of fixed 250px */
        }

        .option-text {
            font-size: 16px;
            line-height: 1.4;
        }

        .option-count {
            font-size: 14px;
        }

        /* 🔍 Search Textarea - Mobile Height */
        .court-search-textarea {
            min-height: 80px !important; /* Reduced from 120px */
            max-height: 150px; /* Prevent excessive growth */
            font-size: 16px !important; /* Prevent iOS zoom */
        }

        /* ✅ Checkboxes - Larger Touch Targets */
        .court-practice-checkbox-item {
            padding: 12px 16px; /* Increased from 8px 12px */
            min-height: 48px;
            align-items: center;
        }

        .court-practice-checkbox-item input[type="checkbox"] {
            width: 20px; /* Increased from 16px */
            height: 20px;
            min-width: 20px;
            min-height: 20px;
        }

        .court-practice-checkbox-item label {
            font-size: 15px;
            padding-left: 10px;
        }

        /* 🔘 Buttons - Touch-Friendly */
        .court-submit-search,
        .court-progress-btn,
        .mobile-menu-toggle {
            min-height: 48px;
            padding: 12px 20px;
            font-size: 16px;
        }

        /* 📋 Filter Sections - More Spacing */
        .court-filter-section {
            padding: 12px 16px;
        }

        .court-filter-section-header {
            padding: 14px 16px;
            font-size: 15px;
            min-height: 48px;
        }

        /* 🎴 Results Cards - Mobile Optimized */
        .court-result-item {
            padding: 14px;
            margin-bottom: 10px;
        }

        .court-result-title {
            font-size: 15px;
            line-height: 1.4;
        }

        .court-result-metadata {
            font-size: 13px;
        }

        /* 📑 Tabs - Touch-Friendly */
        .results-summary-tab {
            min-height: 48px;
            padding: 14px 16px;
            font-size: 15px;
        }

        /* 🎬 Mobile Menu Toggle - Filter Badge */
        .mobile-menu-toggle {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .mobile-menu-toggle .filter-badge {
            background: #FF4444;
            color: white;
            border-radius: 10px;
            padding: 2px 8px;
            font-size: 12px;
            font-weight: bold;
            min-width: 20px;
            text-align: center;
        }
    }

    /* 📱 VERY SMALL PHONES (up to 480px) */
    @media (max-width: 480px) {
        /* Even more compact for small screens */
        .court-search-textarea {
            min-height: 70px !important;
        }

        .court-filter-section-header {
            font-size: 14px;
            padding: 12px 14px;
        }

        .court-practice-checkbox-item {
            padding: 10px 14px;
        }

        .court-practice-checkbox-item label {
            font-size: 14px;
        }

        /* Autocomplete full-screen on very small devices */
        .court-autocomplete-dropdown {
            max-height: 70vh !important;
            left: 0 !important;
            right: 0 !important;
            width: 100vw !important;
            border-radius: 0;
            max-width: none !important;
        }
    }

    /* 🎯 Touch Feedback - All Sizes */
    @media (hover: none) and (pointer: coarse) {
        /* Touch devices only - add active state feedback */
        .court-autocomplete-option:active,
        .court-practice-checkbox-item:active,
        .court-submit-search:active,
        .results-summary-tab:active {
            transform: scale(0.98);
            opacity: 0.8;
        }

        /* Remove hover effects on touch devices */
        .court-autocomplete-option:hover {
            background-color: inherit;
        }
    }

    /* 📊 Prevent iOS zoom on input focus */
    @supports (-webkit-touch-callout: none) {
        /* iOS-specific styles */
        input[type="text"],
        input[type="search"],
        textarea {
            font-size: 16px !important; /* Minimum to prevent zoom */
        }
    }

    /* ============================================================================
       📱 MOBILE ACCORDION STYLES - Collapsible filter sections on mobile (<768px)
       ============================================================================ */

    @media (max-width: 767px) {
        /* Mobile accordion wrapper - only applies when JavaScript adds the class */
        .court-filter-section-mobile-accordion {
            margin-bottom: 8px;
            border: 1px solid #4c4c4c;
            border-radius: 6px;
            background: #333333;
            overflow: hidden;
            transition: border-color 0.2s ease;
        }

        .court-filter-section-mobile-accordion:hover {
            border-color: #51afea;
        }

        .court-filter-section-mobile-accordion.expanded {
            border-color: #51afea;
        }

        /* Accordion header - touch-friendly 48px height */
        .court-filter-section-mobile-accordion .court-filter-section-header {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            min-height: 48px; /* Touch-friendly */
            cursor: pointer;
            user-select: none;
            background: #333333;
            transition: background-color 0.2s ease;
            border-bottom: 1px solid #4c4c4c;
        }

        .court-filter-section-mobile-accordion .court-filter-section-header:active {
            transform: scale(0.98);
            opacity: 0.9;
        }

        .court-filter-section-mobile-accordion.expanded .court-filter-section-header {
            background: #51afea;
            color: white;
            border-bottom-color: #51afea;
        }

        /* Accordion icon */
        .court-filter-section-mobile-accordion .court-filter-section-icon {
            font-size: 16px;
            margin-right: 12px;
            flex-shrink: 0;
        }

        /* Accordion title */
        .court-filter-section-mobile-accordion .court-filter-section-title {
            flex: 1;
            font-size: 14px;
            font-weight: 600;
            color: #e0e0e0;
        }

        .court-filter-section-mobile-accordion.expanded .court-filter-section-title {
            color: white;
        }

        /* Active filter count badge */
        .court-filter-section-mobile-accordion .court-filter-section-count {
            font-size: 12px;
            color: #51afea;
            background: rgba(82, 175, 234, 0.15);
            padding: 2px 8px;
            border-radius: 10px;
            margin-right: 12px;
            font-weight: 600;
        }

        .court-filter-section-mobile-accordion.expanded .court-filter-section-count {
            color: white;
            background: rgba(255, 255, 255, 0.2);
        }

        /* Toggle icon (▼/▲) */
        .court-filter-section-mobile-accordion .court-filter-section-toggle {
            font-size: 12px;
            color: #b8b8b8;
            transition: transform 0.3s ease, color 0.2s ease;
            flex-shrink: 0;
        }

        .court-filter-section-mobile-accordion.expanded .court-filter-section-toggle {
            color: white;
        }

        /* Collapsible content area */
        .court-filter-section-mobile-accordion .court-filter-section-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease;
            background: #353535;
        }

        .court-filter-section-mobile-accordion.expanded .court-filter-section-content {
            max-height: 2000px; /* Large enough for any filter section */
            padding: 12px;
        }

        /* Mobile: Reduce spacing inside filter sections */
        .court-filter-section-mobile-accordion .court-filter-field {
            margin-bottom: 12px;
        }

        .court-filter-section-mobile-accordion .court-filter-fields-grid-simple {
            gap: 12px;
        }

        /* Ensure filter inputs are touch-friendly inside accordions */
        .court-filter-section-mobile-accordion input[type="text"],
        .court-filter-section-mobile-accordion input.autocomplete-field,
        .court-filter-section-mobile-accordion select {
            min-height: 44px;
            font-size: 16px; /* Prevent iOS zoom */
        }

        /* Touch feedback for accordion headers on touch devices */
        @media (hover: none) and (pointer: coarse) {
            .court-filter-section-mobile-accordion .court-filter-section-header:active {
                background: #4a4a4a;
            }

            .court-filter-section-mobile-accordion.expanded .court-filter-section-header:active {
                background: #4199d4;
            }
        }
    }

    /* ============================================================================
       📱 VERY SMALL PHONES (<480px) - Even more compact accordion styles
       ============================================================================ */

    @media (max-width: 480px) {
        .court-filter-section-mobile-accordion .court-filter-section-header {
            padding: 10px 12px;
            min-height: 44px; /* Slightly smaller on very small screens */
        }

        .court-filter-section-mobile-accordion .court-filter-section-title {
            font-size: 13px;
        }

        .court-filter-section-mobile-accordion .court-filter-section-icon {
            font-size: 14px;
            margin-right: 10px;
        }

        .court-filter-section-mobile-accordion .court-filter-section-count {
            font-size: 11px;
            padding: 2px 6px;
        }

        /* ✅ FIX: Court summary messages padding on mobile */
        body.body-mobile #court-summary-messages {
            padding-bottom: 120px !important; /* Prevent input from covering messages */
        }

      
        /* Ensure full width usage on mobile */
        body.body-mobile #court-practice-container {
            width: 100% !important;
            max-width: 100vw !important;
            overflow-x: hidden !important;
        }
    }

    /* ============================================================================
       MULTI-SELECT CHIP SYSTEM (v5.5)
       ============================================================================ */

    /* Container for multi-select with chips */
    .court-multiselect-container {
        position: relative;
        background: #1e1e1e;
        border: 1px solid #3a3a3a;
        border-radius: 6px;
        min-height: 42px;
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 4px;
        gap: 4px;
    }

    .court-multiselect-container:focus-within {
        border-color: #51afea;
        box-shadow: 0 0 0 2px rgba(82, 175, 234, 0.2);
    }

    /* Main filter chips container - shows all selected filter chips at top */
    .court-filter-chips-container {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 4px;
        min-height: 0;
        margin-bottom: 8px;
        border-bottom: 1px solid #3a3a3a;
    }

    .court-filter-chips-container:empty {
        display: none;
        border-bottom: none;
        margin-bottom: 0;
        padding: 0;
    }

    /* Chips container within multiselect */
    .court-chips-container {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 4px;
    }

    /* Individual chip styling */
    .court-chip {
        display: inline-flex;
        align-items: center;
        background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
        border: 1px solid #4a4a4a;
        border-radius: 16px;
        padding: 4px 8px 4px 12px;
        font-size: 13px;
        color: #e0e0e0;
        max-width: 250px;
        animation: chipAppear 0.2s ease-out;
    }

    /* Compound chip for pravna podlaga - distinct styling */
    .court-chip.court-chip-pravna-podlaga,
    .court-chip[data-field="pravnaPodlaga"] {
        background: linear-gradient(135deg, #2d4a3a 0%, #1e3a2d 100%);
        border-color: #3a5a4a;
    }

    .court-chip-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .court-chip-count {
        color: #9c9c9c;
        font-size: 11px;
        margin-left: 4px;
    }

    .court-chip-remove {
        background: none;
        border: none;
        color: #9c9c9c;
        cursor: pointer;
        padding: 0 2px 0 6px;
        font-size: 16px;
        line-height: 1;
    }

    .court-chip-remove:hover {
        color: #ff6b6b;
    }

    /* Multi-select input - inherits from .court-filter-input, just add flex behavior */
    .court-multiselect-input {
        flex: 1;
        min-width: 100px;
    }

    /* Multi-select dropdown */
    .court-multiselect-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2a2a2a;
        border: 1px solid #3a3a3a;
        border-radius: 0 0 6px 6px;
        max-height: 350px;
        overflow-y: auto;
        z-index: 1000;
        display: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .court-multiselect-dropdown.visible {
        display: block;
    }

    /* Step header for two-step selection */
    .court-multiselect-step-header {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        background: #252525;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        gap: 10px;
    }

    .step-number {
        width: 24px;
        height: 24px;
        background: #3d8ac7;
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
        flex-shrink: 0;
    }

    .step-title {
        flex: 1;
        font-size: 13px;
        color: #e0e0e0;
    }

    .court-multiselect-back {
        background: none;
        border: 1px solid #4a4a4a;
        color: #9c9c9c;
        padding: 4px 10px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 12px;
    }

    .court-multiselect-back:hover {
        background: #3a3a3a;
        color: #fff;
    }

    /* Skip option (for kratica-only selection) */
    .court-multiselect-skip-option {
        display: flex;
        align-items: center;
        padding: 12px;
        background: #2a2a3a;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        cursor: pointer;
        gap: 10px;
    }

    .court-multiselect-skip-option:hover {
        background: #3a3a4a;
    }

    .skip-icon {
        font-size: 16px;
    }

    .skip-text {
        color: #9c9c9c;
        font-size: 13px;
    }

    /* Multi-select options */
    .court-multiselect-options {
        max-height: 280px;
        overflow-y: auto;
    }

    .court-multiselect-option {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        cursor: pointer;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        gap: 8px;
    }

    .court-multiselect-option:hover {
        background: #3a3a3a;
    }

    .court-multiselect-option.selected {
        background: rgba(82, 175, 234, 0.15);
    }

    .court-multiselect-option.selected.disabled {
        opacity: 0.6;
        cursor: default;
        pointer-events: none;
    }

    .court-multiselect-option.has-chips {
        border-left: 3px solid #51afea;
    }

    .option-checkbox {
        color: #51afea;
        font-size: 14px;
    }

    .option-text {
        flex: 1;
        color: #e0e0e0;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .option-count {
        color: #a8a8a8;
        font-size: 12px;
        flex-shrink: 0;
    }

    .option-badge {
        background: #3d8ac7;
        color: #fff;
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 10px;
        flex-shrink: 0;
    }

    /* Loading and empty states */
    .court-multiselect-loading,
    .court-multiselect-empty {
        padding: 20px;
        text-align: center;
        color: #a8a8a8;
        font-size: 13px;
    }

    .court-multiselect-loading::before {
        content: '';
        display: inline-block;
        width: 16px;
        height: 16px;
        border: 2px solid #51afea;
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-right: 8px;
        vertical-align: middle;
    }

    @keyframes chipAppear {
        from { transform: scale(0.8); opacity: 0; }
        to { transform: scale(1); opacity: 1; }
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    /* END MULTI-SELECT CHIP SYSTEM */

    /* ============================================ */
    /* V8.9 UX IMPROVEMENTS                        */
    /* ============================================ */

    /* Touch-friendly history buttons (44px minimum) */
    .court-session-edit,
    .court-session-delete {
        min-width: 44px;
        min-height: 44px;
        padding: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: background-color 0.15s ease;
    }

    .court-session-edit:hover,
    .court-session-delete:hover {
        background-color: rgba(81, 175, 234, 0.15);
    }

    /* Focus styles for keyboard navigation (WCAG 2.4.7) */
    .court-session-edit:focus,
    .court-session-delete:focus,
    .court-chip-remove:focus,
    .court-dropdown-button:focus,
    .court-edit-save:focus,
    .court-edit-cancel:focus {
        outline: 3px solid #51afea;
        outline-offset: 2px;
    }

    .court-filter-input:focus,
    .autocomplete-field:focus,
    .court-date-input:focus,
    .court-history-edit-input:focus {
        outline: none;
        border-color: #51afea !important;
        box-shadow: 0 0 0 2px rgba(82, 175, 234, 0.3);
    }

    /* Prevent browser autofill from changing background color */
    .court-filter-input:-webkit-autofill,
    .autocomplete-field:-webkit-autofill,
    .court-date-input:-webkit-autofill {
        -webkit-box-shadow: 0 0 0 1000px #3c3c3c inset !important;
        -webkit-text-fill-color: #e0e0e0 !important;
        background-color: #3c3c3c !important;
        transition: background-color 5000s ease-in-out 0s;
    }

    /* Disabled field styling (kratica→člen dependency) */
    #courtDynamicFieldsContainer input[disabled] {
        background-color: rgba(60, 60, 60, 0.5) !important;
        cursor: not-allowed;
        opacity: 0.6;
    }

    /* V11 FIX: Container padding - enough space for bottom dropdowns */
    #courtDynamicFieldsContainer {
        padding-bottom: 40px;
    }

    /* V11 FIX: Standardize spacing between ALL filter fields - tight 8px */
    #courtDynamicFieldsContainer .court-filter-field {
        margin-bottom: 8px;
    }

    /* V11 FIX: Remove extra margin from last field to avoid double spacing */
    #courtDynamicFieldsContainer .court-filter-field:last-child {
        margin-bottom: 0;
    }

    /* V11 FIX: Ensure grid gap is consistent - tight 6px */
    #courtDynamicFieldsContainer .court-filter-fields-grid-simple {
        gap: 6px;
    }

    /* V11 FIX: Consistent margin for ALL section types - 12px between sections */
    #courtDynamicFieldsContainer .court-filter-legal-base-section,
    #courtDynamicFieldsContainer .court-filter-text-section,
    #courtDynamicFieldsContainer .court-filter-date-section,
    #courtDynamicFieldsContainer .court-filter-dropdown-section {
        margin-bottom: 12px;
    }

    /* V11 FIX: Remove margin from last section */
    #courtDynamicFieldsContainer > div:last-child {
        margin-bottom: 0;
    }

    /* Dependency hint styling for člen field */
    .court-field-dependency-hint {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 6px;
        padding: 6px 8px;
        font-size: 12px;
        color: #ff9800;
        background-color: rgba(255, 152, 0, 0.1);
        border-radius: 4px;
        border-left: 3px solid #ff9800;
    }

    .court-field-dependency-hint svg {
        flex-shrink: 0;
    }

    /* Inline edit controls (Save/Cancel buttons) */
    .court-edit-controls {
        display: flex;
        gap: 4px;
        margin-left: 8px;
    }

    .court-edit-save,
    .court-edit-cancel {
        min-width: 32px;
        min-height: 32px;
        padding: 4px 8px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        background: rgba(60, 60, 60, 0.8);
        color: #e0e0e0;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .court-edit-save:hover {
        background: rgba(76, 175, 80, 0.3);
        border-color: #4CAF50;
        color: #4CAF50;
    }

    .court-edit-cancel:hover {
        background: rgba(244, 67, 54, 0.3);
        border-color: #f44336;
        color: #f44336;
    }

    /* History edit input styling */
    .court-history-edit-input {
        flex: 1;
        padding: 6px 10px;
        border: 2px solid #51afea;
        border-radius: 4px;
        background: rgba(40, 40, 40, 0.95);
        color: #e0e0e0;
        font-size: 14px;
    }

    /* History item in edit mode layout */
    .court-search-history-item.editing .court-search-history-item-content {
        display: flex;
        align-items: center;
        flex: 1;
    }

    /* Date range layout - both fields take equal space */
    .court-date-range {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .court-date-input-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        flex: 1;
    }

    .court-date-input-group .court-date-label {
        flex-shrink: 0;
        min-width: 28px;
    }

    .court-date-input-group .court-autocomplete-wrapper {
        flex: 1;
        min-width: 0;
    }

    /* END V8.9 UX IMPROVEMENTS */

    /* ═══════════════════════════════════════════════════════════════════════ */
    /* Premium Locked Sidebar Overlay                                          */
    /* Matches TFL AI Dark Mode Design System                                  */
    /* ═══════════════════════════════════════════════════════════════════════ */

    .court-sidebar-locked-overlay {
        position: absolute;
        top: 1px;
        left: 1px;
        right: 0;
        bottom: 0;
        background: #272727;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 28px 20px;
        text-align: center;
    }

    .court-sidebar-locked-icon {
        width: 72px;
        height: 72px;
        background: #2a2a2a;
        border: 2px solid rgba(255,255,255,0.08);
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 24px;
    }

    .court-sidebar-locked-icon svg {
        width: 36px;
        height: 36px;
        color: #51afea;
    }

    .court-sidebar-locked-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: transparent;
        border: 1px solid #51afea;
        color: #51afea;
        font-size: 10px;
        font-weight: 600;
        padding: 6px 14px;
        border-radius: 4px;
        margin-bottom: 20px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .court-sidebar-locked-badge svg {
        width: 12px;
        height: 12px;
    }

    .court-sidebar-locked-title {
        font-size: 22px;
        font-weight: 600;
        color: #ffffff;
        margin-bottom: 8px;
        line-height: 1.3;
        letter-spacing: -0.3px;
    }

    .court-sidebar-locked-subtitle {
        font-size: 14px;
        color: #51afea;
        margin-bottom: 16px;
        font-weight: 500;
    }

    .court-sidebar-locked-description {
        font-size: 13px;
        color: #9c9c9c;
        line-height: 1.65;
        margin-bottom: 24px;
        max-width: 320px;
    }

    .court-sidebar-locked-benefits {
        text-align: left;
        background: #2a2a2a;
        border: 1px solid #3a3a3a;
        border-radius: 8px;
        padding: 16px 18px;
        margin-bottom: 24px;
        width: 100%;
        max-width: 320px;
    }

    .court-sidebar-locked-benefit {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        color: #b8b8b8;
        font-size: 13px;
        border-bottom: 1px solid #3a3a3a;
    }

    .court-sidebar-locked-benefit:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .court-sidebar-locked-benefit:first-child {
        padding-top: 0;
    }

    .court-sidebar-locked-benefit svg {
        color: #51afea;
        flex-shrink: 0;
        width: 16px;
        height: 16px;
    }

    .court-sidebar-locked-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 320px;
    }

    .court-sidebar-locked-btn {
        padding: 14px 24px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s ease;
        border: none;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .court-sidebar-locked-btn-primary {
        background: #3d8ac7;
        color: #ffffff;
    }

    .court-sidebar-locked-btn-primary:hover {
        background: #51afea;
        color: #ffffff;
        text-decoration: none;
    }

    .court-sidebar-locked-btn-secondary {
        background: #2a2a2a;
        border: 1px solid rgba(255,255,255,0.12);
        color: #b8b8b8;
    }

    .court-sidebar-locked-btn-secondary:hover {
        background: #333333;
        color: #ffffff;
        text-decoration: none;
    }

    /* Mobile adjustments */
    body.body-mobile .court-sidebar-locked-overlay {
        padding: 20px 16px;
    }

    body.body-mobile .court-sidebar-locked-title {
        font-size: 20px;
    }

    body.body-mobile .court-sidebar-locked-benefits,
    body.body-mobile .court-sidebar-locked-actions {
        max-width: 100%;
    }

/* ============================================
   COURT SEARCH HISTORY STYLES
   Matching ai-history-item dark card design
   ============================================ */

#court-search-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
}

.court-search-history-item {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    margin-bottom: 0;
}

.court-search-history-item:hover {
    background-color: #333333;
    border-color: rgba(81, 175, 234, 0.2);
}

.court-search-history-item-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.court-search-history-item-title {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 700px;
    color: #fff;
}

.court-search-history-item-time {
    font-size: 14px;
    color: #9c9c9c;
}

.court-search-history-item-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.court-search-history-item:hover .court-search-history-item-actions {
    opacity: 1;
}

.court-session-edit,
.court-session-delete {
    background: none;
    border: none;
    color: #9c9c9c;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.court-session-edit:hover,
.court-session-delete:hover {
    background-color: #333333;
    color: #51afea;
}

/* Inline editing input field */
.court-history-edit-input {
    width: 100%;
    border: 1px solid #51afea;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    color: #fff;
    background: #1a1a1a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(81, 175, 234, 0.2);
}

.court-history-edit-input:focus {
    border-color: #51afea;
    box-shadow: 0 0 0 2px rgba(81, 175, 234, 0.3);
}


