/* Model Selector Styles */

.model-selector-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.model-selector-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-family: 'Fivo Sans', sans-serif;
}

.model-selector-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.model-selector-button:active {
    background-color: rgba(255, 255, 255, 0.2);
}

.model-selector-button .icon-size {
    font-size: 14px;
}

.model-selector-button .model-name {
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .model-name {
        font-size: 12px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Dropdown opens UPWARD */
.model-dropdown {
    position: fixed;
    background-color: #1e2329;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    padding: 8px 0;
    z-index: 2147483647; /* Higher than shortcuts autocomplete */
    max-height: 300px;
    overflow-y: auto;
    min-width: 280px;
    max-width: 400px;
}

.model-dropdown.hidden {
    display: none;
}

.model-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-option:hover:not(.disabled) {
    background-color: rgba(255, 255, 255, 0.1);
}

.model-option.selected {
    background-color: rgba(4, 164, 146, 0.2);
    border-left: 3px solid #04a492;
}

.model-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-option-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-option-name .model-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #04a492;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
}

.model-option-name .model-badge.premium {
    background-color: #ffa500;
}

.model-option-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.model-option-rating {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 4px;
}

.model-option-rating i {
    color: #ffa500;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .model-selector-button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    
    .model-dropdown {
        min-width: 180px;
        right: 0;
        left: auto; /* Align to right on mobile */
    }
    
    .model-option {
        padding: 10px 12px;
    }
    
    .model-option-name {
        font-size: 13px;
    }
    
    .model-option-description {
        font-size: 11px;
    }
}

/* Scrollbar styling for dropdown */
.model-dropdown::-webkit-scrollbar {
    width: 6px;
}

.model-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.model-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.model-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animation for dropdown */
.model-dropdown {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
