/* ============================================
   Modern Court Selector Dropdown Styles
   Uses --org-primary from _Layout.cshtml
   Supports Court (Blue) and Law Firm (Green)
   ============================================ */

/* Breadcrumbs bar - add spacing below for separation */
#breadcrumbs {
    padding-bottom: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

/* Container wrapper */
#dvCourt {
    padding: 0;
    margin-bottom: 12px;
}

    #dvCourt .chosen-container {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }

    /* Main dropdown trigger - modern flat design */
    #dvCourt .chosen-container-single .chosen-single {
        height: 38px;
        line-height: 36px;
        padding: 0 12px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background: #ffffff;
        background-image: none;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        color: #374151;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
    }

        #dvCourt .chosen-container-single .chosen-single:hover {
            border-color: #9ca3af;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

    /* Active/focused state */
    #dvCourt .chosen-container-active .chosen-single,
    #dvCourt .chosen-container-active.chosen-with-drop .chosen-single {
        border-color: var(--org-primary) !important;
        box-shadow: 0 0 0 3px rgba(var(--org-primary-rgb), 0.15);
        outline: none;
    }

    /* Dropdown arrow container */
    #dvCourt .chosen-container-single .chosen-single div {
        width: 32px;
        border-left: none;
    }

        /* Custom dropdown arrow - using CSS instead of sprite */
        #dvCourt .chosen-container-single .chosen-single div b {
            background: none !important;
            position: relative;
        }

            #dvCourt .chosen-container-single .chosen-single div b::before {
                content: "" !important;
                display: none !important;
            }

            #dvCourt .chosen-container-single .chosen-single div b::after {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 0;
                height: 0;
                border-left: 5px solid transparent;
                border-right: 5px solid transparent;
                border-top: 6px solid #6b7280;
                transition: transform 0.2s ease;
            }

    /* Arrow rotation when open */
    #dvCourt .chosen-container-active.chosen-with-drop .chosen-single div b::after {
        transform: translate(-50%, -50%) rotate(180deg);
        border-top-color: var(--org-primary);
    }

    /* Dropdown panel */
    #dvCourt .chosen-container .chosen-drop {
        margin-top: 4px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.05);
        overflow: hidden;
    }

    #dvCourt .chosen-container-single.chosen-with-drop .chosen-single {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    /* Search input container */
    #dvCourt .chosen-container-single .chosen-search {
        padding: 10px 12px;
        margin: 0;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
    }

        /* Search input field */
        #dvCourt .chosen-container-single .chosen-search input[type="text"] {
            width: 100%;
            height: 36px;
            padding: 8px 12px;
            padding-right: 32px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
            background-size: 18px;
            background-position: right 10px center;
            font-size: 14px;
            color: #374151;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

            #dvCourt .chosen-container-single .chosen-search input[type="text"]:focus {
                border-color: var(--org-primary);
                box-shadow: 0 0 0 3px rgba(var(--org-primary-rgb), 0.1);
                outline: none;
            }

            #dvCourt .chosen-container-single .chosen-search input[type="text"]::placeholder {
                color: #9ca3af;
            }

    /* Results container */
    #dvCourt .chosen-container .chosen-results {
        margin: 0;
        padding: 6px;
        max-height: 280px;
    }

        /* Individual result items */
        #dvCourt .chosen-container .chosen-results li {
            padding: 10px 12px;
            margin: 2px 0;
            border-radius: 6px;
            font-size: 14px;
            line-height: 1.4;
            color: #374151;
            transition: background-color 0.15s ease;
        }

            /* Hover state for results */
            #dvCourt .chosen-container .chosen-results li.active-result:hover {
                background-color: #f3f4f6;
            }

            /* Highlighted/keyboard selected state */
            #dvCourt .chosen-container .chosen-results li.highlighted {
                background: linear-gradient(135deg, var(--org-primary) 0%, var(--org-primary-dark) 100%);
                background-image: none;
                background-color: var(--org-primary);
                color: #ffffff;
                border-radius: 6px;
            }

            /* Selected option indicator */
            #dvCourt .chosen-container .chosen-results li.result-selected {
                background-color: var(--org-primary-light);
                color: var(--org-primary);
                font-weight: 500;
            }

                #dvCourt .chosen-container .chosen-results li.result-selected::before {
                    content: '\2713';
                    margin-right: 8px;
                    font-weight: bold;
                }

            /* No results message */
            #dvCourt .chosen-container .chosen-results li.no-results {
                padding: 16px 12px;
                text-align: center;
                color: #6b7280;
                background: #f9fafb;
                border-radius: 6px;
            }

    /* Placeholder text */
    #dvCourt .chosen-container-single .chosen-default {
        color: #9ca3af;
        font-weight: 400;
    }

    /* Deselect button (x) */
    #dvCourt .chosen-container-single .chosen-single abbr {
        top: 50%;
        transform: translateY(-50%);
        right: 32px;
        width: 16px;
        height: 16px;
        background: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        #dvCourt .chosen-container-single .chosen-single abbr::after {
            content: '\00D7';
            font-size: 18px;
            color: #9ca3af;
            line-height: 1;
        }

        #dvCourt .chosen-container-single .chosen-single abbr:hover::after {
            color: #ef4444;
        }

    /* Disabled state */
    #dvCourt .chosen-disabled .chosen-single {
        background: #f3f4f6;
        cursor: not-allowed;
        opacity: 0.7;
    }

    /* Custom scrollbar for results */
    #dvCourt .chosen-container .chosen-results::-webkit-scrollbar {
        width: 6px;
    }

    #dvCourt .chosen-container .chosen-results::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    #dvCourt .chosen-container .chosen-results::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        #dvCourt .chosen-container .chosen-results::-webkit-scrollbar-thumb:hover {
            background: #a1a1a1;
        }
