.model-switch {
    position: relative;
    transition: all 0.3s ease;
}

.model-switch.loading {
    opacity: 0.7;
    pointer-events: none;
}

.model-switch.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.model-switch.active {
    background-color: #3498db;
    color: #fff;
}

.model-switch.absent {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Принудительное удаление класса loading */
.model-switch:not(.loading)::after {
    display: none !important;
}

.model-switch.active {
    background-color: #3498db;
    color: #fff;
}

.model-switch.absent {
    opacity: 0.5;
}
 