/* HASKARI AI — couche de finition UX, indépendante du fournisseur */
#haskari-ai-panel {
    --ai-gold: #ffb800;
    --ai-soft-border: rgba(255, 255, 255, 0.08);
}

#ai-panel-title {
    letter-spacing: -0.02em;
}

.ai-status-line {
    letter-spacing: 0.08em !important;
    text-transform: none !important;
    font-family: inherit !important;
    font-weight: 650;
}

#ai-panel-status {
    font-size: 10px;
}

#haskari-ai-panel .ai-msg-assistant .ai-msg-content {
    font-size: 13px !important;
    line-height: 1.68 !important;
    overflow-wrap: anywhere;
}

.ai-rich-heading {
    margin: 1rem 0 0.5rem;
    color: #fff;
    font-weight: 850;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.ai-rich-heading:first-child { margin-top: 0; }
.ai-rich-heading--2 { font-size: 15px; }
.ai-rich-heading--3 { font-size: 14px; }
.ai-rich-heading--4 { font-size: 13px; color: #f6d06d; }

.ai-rich-paragraph {
    margin: 0.55rem 0;
    color: rgb(209 213 219);
}

.ai-rich-list {
    display: grid;
    gap: 0.55rem;
    margin: 0.65rem 0 0.9rem;
    padding-left: 1.2rem;
    color: rgb(209 213 219);
    list-style: disc;
}

.ai-rich-list--ordered { list-style: decimal; }

.ai-rich-list li::marker {
    color: var(--ai-gold);
    font-weight: 800;
}

.ai-rich-table-wrap {
    width: 100%;
    margin: 0.85rem 0;
    overflow-x: auto;
    border: 1px solid var(--ai-soft-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    scrollbar-width: thin;
}

.ai-rich-table {
    width: 100%;
    min-width: 360px;
    border-collapse: collapse;
    font-size: 11px;
}

.ai-rich-table th,
.ai-rich-table td {
    padding: 0.7rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-rich-table th {
    color: #fff;
    background: rgba(255, 184, 0, 0.08);
    font-weight: 800;
    white-space: nowrap;
}

.ai-rich-table tr:last-child td { border-bottom: 0; }

.ai-rich-link {
    color: var(--ai-gold);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(255, 184, 0, 0.35);
    text-underline-offset: 3px;
}

#ai-chat-form {
    position: relative;
    z-index: 2;
}

#ai-quota-bar.ai-quota-admin {
    order: 20;
    margin: 0.15rem 0 0 !important;
    padding: 0.65rem 0.2rem 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#ai-quota-bar.ai-quota-admin #ai-quota-label,
#ai-quota-bar.ai-quota-admin #ai-quota-pct {
    color: rgb(107 114 128) !important;
    font-size: 9px;
}

.ai-feedback-detail {
    width: 100%;
    display: grid;
    gap: 0.6rem;
    margin-top: 0.35rem;
    padding: 0.8rem;
    border: 1px solid rgba(255, 184, 0, 0.18);
    border-radius: 14px;
    background: rgba(255, 184, 0, 0.035);
}

.ai-feedback-detail__label {
    color: rgb(229 231 235);
    font-size: 11px;
    font-weight: 750;
}

.ai-feedback-detail__label span {
    color: rgb(107 114 128);
    font-size: 9px;
    font-weight: 500;
}

.ai-feedback-detail textarea {
    width: 100%;
    resize: vertical;
    min-height: 72px;
    max-height: 160px;
    padding: 0.7rem 0.75rem;
    color: #fff;
    font-size: 11px;
    line-height: 1.5;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.045);
}

.ai-feedback-detail textarea:focus {
    border-color: rgba(255, 184, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.06);
}

.ai-feedback-detail__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ai-feedback-detail__actions button {
    padding: 0.5rem 0.75rem;
    border-radius: 9px;
    color: rgb(209 213 219);
    font-size: 10px;
    font-weight: 750;
    background: rgba(255, 255, 255, 0.06);
}

.ai-feedback-detail__actions button[type="submit"] {
    color: #09090d;
    background: var(--ai-gold);
}

.ai-feedback-detail__error {
    color: rgb(248 113 113);
    font-size: 10px;
}

.ai-feedback-thanks {
    color: rgb(110 231 183);
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 480px) {
    #haskari-ai-panel .ai-msg-assistant .ai-msg-content {
        font-size: 12.5px !important;
        line-height: 1.62 !important;
    }

    .ai-rich-table { min-width: 320px; }
    .ai-rich-table th,
    .ai-rich-table td { padding: 0.6rem; }
}
