/**
 * -------------------------------------------------------------------------
 * Intranet IA plugin for GLPI - CSS Styles
 * -------------------------------------------------------------------------
 */

/* Estilos gerais do plugin */
.plugin-intranetia {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Card de análise IA */
.ia-analysis-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ia-analysis-card h3 {
    margin-top: 0;
    font-size: 1.2em;
    font-weight: 600;
}

/* Botão de análise IA */
.btn-ia-analyze {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ia-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.btn-ia-analyze:active {
    transform: translateY(0);
}

.btn-ia-analyze i {
    font-size: 1.1em;
}

/* Indicador de confiança */
.confidence-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.confidence-high {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.confidence-medium {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.confidence-low {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Card de estatísticas */
.stats-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.stats-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0 5px 0;
}

.stats-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading spinner para análise */
.ia-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #667eea;
    font-weight: 500;
}

.ia-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Resposta da IA */
.ia-response {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.95em;
    line-height: 1.6;
}

.ia-response pre {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
}

/* Icons personalizados */
.icon-ia {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23667eea"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Responsividade */
@media (max-width: 768px) {
    .ia-analysis-card {
        padding: 15px;
        margin: 10px 0;
    }
    
    .btn-ia-analyze {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .stats-number {
        font-size: 2em;
    }
}

/* Tema escuro (se suportado pelo GLPI) */
@media (prefers-color-scheme: dark) {
    .stats-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .ia-response {
        background: #4a5568;
        color: #e2e8f0;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Tooltip personalizado */
.ia-tooltip {
    position: relative;
    cursor: help;
}

.ia-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 1000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
}
