/**
 * Veterinary AI Chatbot - Model Switcher Toggle Styles
 * Version: 3.0
 * Description: 3-mode toggle switch (F, X, Z)
 */

/* ============================================
   MODEL SWITCHER CONTAINER
   ============================================ */
.vet-model-switcher {
    /*display: none !important;*/
    
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
    border-radius: 12px 12px 0 0;
}

.model-switcher-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   TOGGLE SWITCH CONTAINER - 3 MODES
   ============================================ */
.model-toggle-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns for F, X, Z */
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    position: relative;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.model-toggle-container:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   TOGGLE BUTTONS (3 MODES)
   ============================================ */
.model-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    font-weight: 500;
    font-size: 13px;
    color: #64748b;
}

.model-toggle-btn:hover:not(.disabled) {
    color: #334155;
}

.model-toggle-btn.active {
    color: white;
}

/* Disabled state */
.model-toggle-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    position: relative;
}

.model-toggle-btn.disabled:hover {
    background: inherit !important;
    transform: none !important;
}

.model-lock {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* ============================================
   SLIDING BACKGROUND - 3 POSITIONS
   ============================================ */
.toggle-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: calc(33.333% - 5.33px); /* Width for 1/3 minus padding */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* F Mode - Position 1 (Left) */
.toggle-slider.f-mode {
    left: 4px;
    transform: translateX(0);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* X Mode - Position 2 (Center) */
.toggle-slider.x-mode {
    left: 4px;
    transform: translateX(calc(100% + 2.67px));
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Z Mode - Position 3 (Right) */
.toggle-slider.z-mode {
    left: 4px;
    transform: translateX(calc(200% + 5.33px));
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================
   TOGGLE CONTENT
   ============================================ */
.toggle-content {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 3;
}

.model-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.model-toggle-btn.active .model-icon {
    transform: scale(1.15);
}

.model-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   MODE DESCRIPTIONS
   ============================================ */
.mode-descriptions {
    margin-top: 12px;
    position: relative;
    min-height: 60px;
}

.mode-desc {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 8px 0;
}

.mode-desc.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desc-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.desc-title::before {
    content: "•";
    color: #667eea;
    font-weight: bold;
}

.desc-text {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    padding-left: 12px;
}

/* ============================================
   UPGRADE NOTICE
   ============================================ */
.mode-upgrade-notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0;
}

.mode-upgrade-notice a:hover {
    background: #f97316 !important;
}

/* ============================================
   DIVIDER
   ============================================ */
.model-switcher-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0 0 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .vet-model-switcher {
        padding: 12px;
    }
    
    .model-toggle-btn {
        padding: 8px 6px;
        font-size: 11px;
        gap: 4px;
    }
    
    .model-icon {
        font-size: 14px;
    }
    
    .model-name {
        font-size: 11px;
    }
    
    .toggle-slider {
        width: calc(33.333% - 4px);
    }
}

@media (max-width: 480px) {
    .model-toggle-btn {
        flex-direction: column;
        padding: 8px 4px;
        gap: 2px;
    }
    
    .model-icon {
        font-size: 16px;
    }
    
    .model-name {
        font-size: 10px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .vet-model-switcher {
        background: #1f2937;
        border-bottom-color: #374151;
    }
    
    .model-toggle-container {
        background: #374151;
        border-color: #4b5563;
    }
    
    .model-toggle-btn {
        color: #9ca3af;
    }
    
    .model-toggle-btn:hover:not(.disabled) {
        color: #d1d5db;
    }
    
    .desc-title {
        color: #e5e7eb;
    }
    
    .desc-text {
        color: #9ca3af;
    }
}

/* ============================================
   ANIMATION
   ============================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-toggle-container {
    animation: slideIn 0.3s ease;
}