﻿/* AccessibleComboBox Styles - Scoped to prevent conflicts */

.accessible-combo-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.accessible-combo-container * {
    box-sizing: border-box;
}

.accessible-combo-container .combo-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
}

.accessible-combo-container .combo-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.accessible-combo-container .combo-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    background: white;
    transition: all 0.2s ease;
    font-family: Nexa-XBold;
    text-transform: uppercase;
}

.accessible-combo-container .combo-input.has-value {
    padding-right: 72px;
}

.accessible-combo-container .combo-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.accessible-combo-container .combo-input:disabled {
    background-color: #f9fafb;
    color: #4b5563;
    cursor: not-allowed;
    border-color: #d1d5db;
    font-weight: normal;
    font-family: Nexa-Book;
    text-transform: uppercase;
}

.accessible-combo-container .combo-input:disabled.has-value {
    font-weight: bold;
    font-family: Nexa-XBold;
}

.accessible-combo-container .combo-input:disabled::placeholder {
    color: #6b7280;
}

.accessible-combo-container .combo-button {
    position: absolute;
    right: 4px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.accessible-combo-container .combo-clear-button,
.accessible-combo-static .combo-clear-button {
    position: absolute;
    right: 36px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    color: #64748b;
}

.accessible-combo-container .combo-clear-button.visible,
.accessible-combo-static .combo-clear-button.visible {
    display: flex;
}

.accessible-combo-container .combo-clear-button:hover,
.accessible-combo-container .combo-clear-button:focus,
.accessible-combo-static .combo-clear-button:hover,
.accessible-combo-static .combo-clear-button:focus {
    background-color: #fee2e2;
    color: #dc2626;
}

.accessible-combo-container .combo-clear-button:focus,
.accessible-combo-static .combo-clear-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.accessible-combo-container .combo-button:hover {
    background-color: #f1f5f9;
}

.accessible-combo-container .combo-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.accessible-combo-container .combo-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.accessible-combo-container .combo-button.open svg {
    transform: rotate(180deg);
}

.accessible-combo-container .combo-listbox {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
    font-family: Nexa-XBold;
}

.accessible-combo-container .combo-listbox.open {
    display: block;
}

.accessible-combo-container .combo-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.accessible-combo-container .combo-option:last-child {
    border-bottom: none;
}

.accessible-combo-container .combo-option:hover,
.accessible-combo-container .combo-option.highlighted {
    background-color: #3b82f6;
    color: white;
    transition: none; /* Completely disable transition for highlighted state */
}

/* Disable hover when keyboard navigation is active */
.accessible-combo-container .combo-listbox.keyboard-active .combo-option:hover {
    background-color: initial;
    color: initial;
}

.accessible-combo-container .combo-listbox.keyboard-active .combo-option.highlighted {
    background-color: #3b82f6;
    color: white;
}

.accessible-combo-container .combo-option.selected {
    background-color: #1e40af;
    color: white;
    font-weight: 600;
    transition: none; /* Immediate transition for selected state */
}

.accessible-combo-container .combo-option.highlighted.selected {
    background-color: #1d4ed8;
    color: white;
    font-weight: 600;
    transition: none; /* Immediate transition for highlighted + selected */
}

.accessible-combo-container .combo-option .option-name {
    font-weight: 500;
}

.accessible-combo-container .no-results {
    padding: 12px 16px;
    color: #64748b;
    font-style: italic;
}

.accessible-combo-container .combo-button:disabled,
.accessible-combo-container .combo-clear-button:disabled,
.accessible-combo-static .combo-clear-button:disabled{
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

.accessible-combo-container .combo-clear-button:disabled,
.accessible-combo-container .combo-input-wrapper.disabled .combo-clear-button,
.accessible-combo-static .combo-input-wrapper.disabled .combo-clear-button {
    display: none;
}

.accessible-combo-container .combo-input-wrapper.disabled {
    opacity: 0.6;
}

.accessible-combo-container .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}