.model-select-wrapper {
    position: fixed;
    top: 1rem;
    left: calc(var(--left-sidebar-width, 260px) + 2.25rem);
    z-index: 350;
    pointer-events: auto;
    transition: left 0.25s ease;
}

.model-select-wrapper .model-select,
.model-select-wrapper .model-select-content {
    pointer-events: auto;
}

.model-select {
    width: auto;
    padding: 0.55rem 0.9rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    outline: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.model-select:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.model-select:focus-visible {
    outline: none;
    box-shadow: none;
}

.model-select-content {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: auto;
    width: auto;
    min-width: 220px;
    background: #2f2f2f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
    z-index: 1500;
    overflow: hidden;
}

.model-select-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.model-option {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
    border-bottom: none;
    transition: background-color 0.1s ease;
    font-size: 0.9rem;
}

.model-option:last-child {
    border-bottom: none;
}

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

.model-option[aria-selected="true"] {
    background-color: transparent;
}

.model-option[aria-selected="true"]::after {
    content: '✓';
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    margin-left: auto;
}

.model-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 0;
}

.model-name {
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.9);
}

.model-note {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.model-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.1);
}

.model-select::after {
    content: '';
    width: 0.35rem;
    height: 0.35rem;
    border-right: 1.5px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.model-select.active::after {
    transform: rotate(-135deg);
}

/* Mobile Optimizations - positioning handled by mobile.css */
@media (max-width: 768px) {
    .model-select {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .model-select-content {
        min-width: 200px;
    }
}
