/**
 * Response Metadata Handler Styles
 * 
 * Styles pour les différents types de réponses du bot
 * identifiés par les métadonnées.
 * 
 * @package    AI_Engine_Elevatio
 * @subpackage AI_Engine_Elevatio/includes
 * @since      2.4.0
 */

/* ==========================================================================
   Balise de métadonnées (toujours invisible)
   ========================================================================== */

i.meta[data-type] {
    display: none !important;
}

/* ==========================================================================
   Badges de métadonnées
   ========================================================================== */

.eai-metadata-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 10px;
    margin-right: 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.eai-metadata-badge:hover {
    opacity: 1;
}

/* Badge scénario (général) */
.eai-scenario-badge {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

/* Badge clarification */
.eai-clarification-badge {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffb74d;
}

/* Badge résumé */
.eai-summary-badge {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Badge recommandation */
.eai-recommendation-badge {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #81c784;
}

/* Badge question */
.eai-question-badge {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f48fb1;
}

/* ==========================================================================
   Styles des messages selon leur type
   ========================================================================== */

/* Message avec métadonnées */
.eai-has-metadata {
    position: relative;
}

/* Bordure latérale selon le type */
.eai-type-scenario {
    border-left: 3px solid #1976d2;
    padding-left: 12px;
}

.eai-type-clarification {
    border-left: 3px solid #f57c00;
    padding-left: 12px;
}

.eai-type-reflection {
    border-left: 3px solid #388e3c;
    padding-left: 12px;
}

.eai-type-summary {
    border-left: 3px solid #7b1fa2;
    padding-left: 12px;
}

.eai-type-recommendation {
    border-left: 3px solid #388e3c;
    padding-left: 12px;
}

.eai-type-answer {
    border-left: 3px solid #0288d1;
    padding-left: 12px;
}

.eai-type-question {
    border-left: 3px solid #c2185b;
    padding-left: 12px;
}

/* ==========================================================================
   Sous-types de scénarios
   ========================================================================== */

/* Questions */
.eai-subtype-questions ol,
.eai-subtype-questions ul {
    margin-top: 12px;
}

.eai-subtype-questions li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Étapes */
.eai-subtype-steps ol {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.eai-subtype-steps ol li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 40px;
    margin-bottom: 16px;
}

.eai-subtype-steps ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: #1976d2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Options */
.eai-subtype-options ul {
    list-style: none;
    padding-left: 0;
}

.eai-subtype-options li {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 3px solid #1976d2;
    transition: background 0.2s ease;
}

.eai-subtype-options li:hover {
    background: #e3f2fd;
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Animation d'apparition */
.eai-has-metadata {
    animation: eai-fade-in 0.4s ease-out;
}

@keyframes eai-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation du badge */
.eai-metadata-badge {
    animation: eai-badge-appear 0.3s ease-out 0.2s both;
}

@keyframes eai-badge-appear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 0.85;
        transform: scale(1);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .eai-metadata-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .eai-subtype-steps ol li::before {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .eai-subtype-steps ol li {
        padding-left: 32px;
    }
}

/* ==========================================================================
   Dark mode (si le thème le supporte)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .eai-scenario-badge {
        background: #1565c0;
        color: #e3f2fd;
        border-color: #1976d2;
    }

    .eai-clarification-badge {
        background: #e65100;
        color: #fff3e0;
        border-color: #f57c00;
    }

    .eai-summary-badge {
        background: #6a1b9a;
        color: #f3e5f5;
        border-color: #7b1fa2;
    }

    .eai-recommendation-badge {
        background: #2e7d32;
        color: #e8f5e9;
        border-color: #388e3c;
    }

    .eai-question-badge {
        background: #ad1457;
        color: #fce4ec;
        border-color: #c2185b;
    }

    .eai-subtype-options li {
        background: #2a2a2a;
    }

    .eai-subtype-options li:hover {
        background: #1565c0;
    }
}