/* Hafid — asesor de ventas por chat (EdugameDigital)
 * Archivo separado para cumplir CSP style-src 'self' (sin inline styles).
 */

.hfc-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    background: #7c3aed;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.hfc-btn:hover { background: #6d28d9; }

.hfc-panel {
    position: fixed;
    right: 18px;
    bottom: 74px;
    z-index: 9999;
    width: min(360px, calc(100vw - 36px));
    height: min(480px, calc(100vh - 120px));
    display: none;
    flex-direction: column;
    background: #18181b;
    color: #e4e4e7;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

.hfc-panel.hfc-open { display: flex; }

.hfc-head {
    padding: 12px 14px;
    background: #7c3aed;
    color: #fff;
    font-weight: 700;
}

.hfc-log {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hfc-msg {
    max-width: 85%;
    padding: 8px 11px;
    border-radius: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.hfc-bot { align-self: flex-start; background: #27272a; }
.hfc-me  { align-self: flex-end; background: #7c3aed; color: #fff; }

.hfc-note {
    font-size: 11px;
    opacity: 0.65;
    padding: 0 12px 6px;
}

.hfc-form {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid #3f3f46;
}

.hfc-in {
    flex: 1;
    border: 0;
    border-radius: 8px;
    padding: 9px;
    background: #09090b;
    color: #e4e4e7;
    outline: none;
}

.hfc-send {
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    background: #7c3aed;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.hfc-send:disabled { opacity: 0.5; cursor: default; }

.hfc-a { color: #bc8cff; }
