/**
 * Tattoo AI Analyzer Styles
 */

.tattoo-ai-analyzer {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Блок выбора провайдера */
.ai-provider-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-provider-selector label {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin: 0;
}

.ai-provider-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-provider-select:hover {
    border-color: #adb5bd;
}

.ai-provider-select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

/* Кнопка анализа */
.btn-analyze-image {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-analyze-image:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-analyze-image:active:not(:disabled) {
    transform: translateY(0);
}

.btn-analyze-image:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-loader {
    font-size: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Блок результатов */
.ai-analysis-result {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.ai-analysis-result h4 {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 15px 0;
}

.result-content {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
}

/* Форматированные результаты */
.analysis-formatted {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analysis-section {
    padding: 10px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    border-radius: 4px;
}

.analysis-section strong {
    color: #495057;
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analysis-confidence {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 10px;
}

/* Уведомления */
.tattoo-ai-notification {
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tattoo-ai-notification--success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.tattoo-ai-notification--error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.tattoo-ai-notification--info {
    background: #cff4fc;
    border: 1px solid #b6effb;
    color: #055160;
}

/* Адаптивность */
@media (max-width: 768px) {
    .tattoo-ai-analyzer {
        padding: 15px;
    }
    
    .ai-provider-selector {
        gap: 12px;
    }
    
    .ai-provider-select {
        max-width: 100%;
    }
    
    .btn-analyze-image {
        width: 100%;
        justify-content: center;
    }
    
    .analysis-section {
        padding: 8px;
    }
}

/* Состояние загрузки */
.tattoo-ai-analyzer.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Кастомные скроллбары для результатов */
.result-content::-webkit-scrollbar {
    width: 8px;
}

.result-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}