/* ===================================
   Dropdown Component Styles
   API Key Selector and similar dropdowns
   =================================== */

/* Container and Loading */
.api-key-selector {
    position: relative;
}

.api-key-selector-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.no-api-keys {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #ffc107;
}

/* Selected API Key Display */
.selected-api-key {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.selected-api-key:hover {
    background: rgba(40, 167, 69, 0.25);
    border-color: rgba(40, 167, 69, 0.5);
    transform: translateY(-1px);
}

.api-key-icon {
    font-size: 16px;
    color: #28a745;
}

.api-key-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.api-key-name {
    color: #28a745;
    font-weight: 600;
    font-family: "Consolas", "Monaco", monospace;
}

.dropdown-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.dropdown-icon.rotate {
    transform: rotate(180deg);
}

/* Dropdown Overlay */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-sticky, 1000) + 1);
    background: transparent;
}

/* API Key Dropdown */
.api-key-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-sticky, 1000) + 2);
    min-width: 300px;
    max-width: 400px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.dropdown-header .material-symbols-outlined {
    font-size: 18px;
    color: #28a745;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.active {
    background: rgba(40, 167, 69, 0.15);
}

.dropdown-item.active:hover {
    background: rgba(40, 167, 69, 0.2);
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.dropdown-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

.badge-default {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dropdown-item-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.dropdown-item-env {
    text-transform: uppercase;
    font-weight: 500;
}

.dropdown-item-separator {
    color: rgba(255, 255, 255, 0.3);
}

.dropdown-item-value {
    font-family: "Consolas", "Monaco", monospace;
    color: rgba(255, 255, 255, 0.6);
}

.check-icon {
    font-size: 20px;
    color: #28a745;
    font-weight: bold;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.dropdown-item .material-symbols-outlined {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
}

.warning-icon {
    font-size: 16px;
    color: #ffc107;
}
