.ufm-ai {
    --ufm-ai-red: #b5122b;
    --ufm-ai-red-dark: #8e0d20;
    --ufm-ai-ink: #171416;
    --ufm-ai-text: #332d30;
    --ufm-ai-muted: #756d71;
    --ufm-ai-soft: #f7f5f5;
    --ufm-ai-line: #e6e1e3;
    --ufm-ai-panel: #ffffff;
    --ufm-ai-gold: #e99a22;
    --ufm-ai-gemini-gradient: linear-gradient(135deg, #4285f4 0%, #4285f4 18%, #ea4335 42%, #fbbc04 64%, #34a853 82%, #4285f4 100%);
    --ufm-ai-shadow: 0 28px 90px rgba(20, 12, 15, .28);
    font-family: inherit;
    color: var(--ufm-ai-text);
}

.ufm-ai *, .ufm-ai *::before, .ufm-ai *::after { box-sizing: border-box; }
.ufm-ai [hidden] { display: none !important; }
.ufm-ai button, .ufm-ai textarea { font: inherit; }

.ufm-ai .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* ==========================================================
   UFM AI - BOTÓN FLOTANTE
   Orden visual:
   1) WhatsApp / ProvideSupport
   2) UFM AI
   3) CookieYes

   Todos alineados al mismo borde derecho.
   ========================================================== */

.ufm-ai__launcher {
    position: fixed !important;
    z-index: 2147481000 !important;

    right: 18px !important;
    left: auto !important;
    top: auto !important;
    bottom: 88px !important;

    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;

    color: #fff;
    cursor: pointer !important;
    transform: none !important;

    transition: transform .18s ease;
}

/* Oculta únicamente el texto "Búsqueda IA". */
.ufm-ai__launcher-text {
    display: none !important;
}

/* Mantiene visible únicamente el orbe/icono dentro del botón. */
.ufm-ai__launcher > :not(.ufm-ai__launcher-orb) {
    display: none !important;
}

/* Fuerza la misma posición para las variantes del plugin. */
.ufm-ai--right-middle .ufm-ai__launcher,
.ufm-ai--right-bottom .ufm-ai__launcher {
    right: 18px !important;
    left: auto !important;
    top: auto !important;
    bottom: 88px !important;
    transform: none !important;
}

.ufm-ai--left-middle .ufm-ai__launcher,
.ufm-ai--left-bottom .ufm-ai__launcher {
    left: 18px !important;
    right: auto !important;
    top: auto !important;
    bottom: 88px !important;
    transform: none !important;
}

.ufm-ai__launcher:hover {
    transform: scale(1.05) !important;
}

.ufm-ai__launcher:focus-visible {
    outline: 3px solid rgba(181,18,43,.28) !important;
    outline-offset: 3px !important;
}

/* Círculo/icono UFM AI: exactamente 56x56 en desktop.
   Se conserva la alineación final acordada con WhatsApp y CookieYes. */
.ufm-ai__launcher-orb {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;

    display: inline-grid !important;
    place-items: center !important;

    border: 1px solid rgba(223, 218, 220, .95) !important;
    border-radius: 50% !important;

    background: rgba(255, 255, 255, .98) !important;

    box-shadow:
        0 8px 24px rgba(0,0,0,.18),
        inset 0 0 0 1px rgba(255,255,255,.72) !important;
}

.ufm-ai__launcher-orb .ufm-ai__gemini-glyph {
    font-size: 25px !important;
    line-height: 1 !important;
}

/* Spark multicolor tipo Gemini, sin dependencia de imágenes externas.
   La forma se dibuja con una máscara SVG local y conserva el gradiente de Google. */
.ufm-ai__gemini-glyph {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;

    background: conic-gradient(
        from 215deg,
        #4285f4 0deg,
        #4285f4 72deg,
        #ea4335 118deg,
        #fbbc04 190deg,
        #34a853 262deg,
        #4285f4 360deg
    );

    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z'/%3E%3C/svg%3E") center / contain no-repeat;

    color: transparent !important;
    overflow: hidden;
    text-indent: -9999px;
}


/* Overlay y ventana principal. */
.ufm-ai__overlay {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 34px);
    background: rgba(7, 7, 8, .66);
    backdrop-filter: blur(9px) saturate(.88);
    -webkit-backdrop-filter: blur(9px) saturate(.88);
    animation: ufm-ai-fade .18s ease-out;
}
.ufm-ai__dialog {
    width: min(1080px, 96vw);
    height: min(880px, 91dvh);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 28px;
    background: rgba(250,249,249,.985);
    box-shadow: var(--ufm-ai-shadow);
    outline: 0;
    animation: ufm-ai-dialog .22s cubic-bezier(.2,.8,.2,1);
}
.ufm-ai__dialog::before,
.ufm-ai__inline-shell::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ufm-ai-red), #d5413b 55%, var(--ufm-ai-gold));
    z-index: 4;
}
@keyframes ufm-ai-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ufm-ai-dialog { from { opacity: 0; transform: translateY(12px) scale(.987); } to { opacity: 1; transform: none; } }

.ufm-ai__inline-shell {
    position: relative;
    width: min(1080px, 100%);
    min-height: 680px;
    height: min(820px, 82dvh);
    margin: 24px auto;
    overflow: hidden;
    border: 1px solid var(--ufm-ai-line);
    border-radius: 26px;
    background: #faf9f9;
    box-shadow: 0 18px 55px rgba(27,17,20,.1);
}

.ufm-ai__workspace {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% 5%, rgba(181,18,43,.055), transparent 25%),
        radial-gradient(circle at 92% 2%, rgba(233,154,34,.055), transparent 22%),
        #faf9f9;
}

/* Barra superior. */
.ufm-ai__topbar {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px 13px 20px;
    border-bottom: 1px solid rgba(222,216,218,.86);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
.ufm-ai__identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ufm-ai__ai-mark,
.ufm-ai__assistant-mark {
    display: inline-grid;
    place-items: center;
    color: var(--ufm-ai-red);
}
.ufm-ai__ai-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: linear-gradient(145deg, #fff0f2, #fff8ef);
    border: 1px solid #f0d7dc;
    font-size: 17px;
}
.ufm-ai__identity-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ufm-ai__identity-text strong { color: var(--ufm-ai-ink); font-size: 15px; }
.ufm-ai__identity-text small { color: #8a8084; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.ufm-ai__topbar-actions { display: flex; align-items: center; gap: 8px; }
.ufm-ai__context-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--ufm-ai-line);
    border-radius: 999px;
    color: #70676b;
    background: #faf8f9;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.ufm-ai__context-badge > span { width: 7px; height: 7px; border-radius: 50%; background: #9b9396; }
.ufm-ai__context-badge.is-on > span { background: #2a9b68; box-shadow: 0 0 0 3px rgba(42,155,104,.1); }
.ufm-ai__new,
.ufm-ai__close {
    min-height: 38px;
    border: 1px solid var(--ufm-ai-line);
    background: #fff;
    color: #50484c;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.ufm-ai__new { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 11px; font-size: 12px; font-weight: 650; }
.ufm-ai__close { width: 40px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; }
.ufm-ai__new:hover, .ufm-ai__close:hover { background: #f6f2f3; border-color: #d9ced1; transform: translateY(-1px); }
.ufm-ai__new:focus-visible, .ufm-ai__close:focus-visible { outline: 3px solid rgba(181,18,43,.16); outline-offset: 2px; }

/* Área de conversación. */
.ufm-ai__conversation {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    padding: clamp(22px, 4vw, 44px) clamp(18px, 5vw, 64px) 28px;
}
.ufm-ai__empty {
    width: min(780px, 100%);
    min-height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px 0 44px;
}
.ufm-ai__empty-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid #ecd6db;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff0f2, #fff9ee);
    color: var(--ufm-ai-red);
    font-size: 25px;
    box-shadow: 0 12px 30px rgba(92,37,51,.08);
}
.ufm-ai__eyebrow { margin: 0 0 8px; color: var(--ufm-ai-red); font-size: 12px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.ufm-ai__title { margin: 0; color: var(--ufm-ai-ink); font-size: clamp(30px, 4.5vw, 49px); line-height: 1.08; letter-spacing: -.035em; font-weight: 730; }
.ufm-ai__subtitle { width: min(680px, 100%); margin: 14px auto 0; color: var(--ufm-ai-muted); font-size: 15.5px; line-height: 1.65; }
.ufm-ai__chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.ufm-ai__chips button,
.ufm-ai__related button {
    border: 1px solid var(--ufm-ai-line);
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #544c4f;
    padding: 9px 13px;
    cursor: pointer;
    font-size: 12.5px;
    line-height: 1.35;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ufm-ai__chips button:hover,
.ufm-ai__related button:hover { transform: translateY(-1px); border-color: #d2a9b1; background: #fff7f8; }
.ufm-ai__chips button:focus-visible,
.ufm-ai__related button:focus-visible { outline: 3px solid rgba(181,18,43,.14); outline-offset: 2px; }

.ufm-ai__thread { width: min(820px, 100%); margin: 0 auto; }
.ufm-ai__turn { margin-bottom: 30px; }
.ufm-ai__turn--user { display: flex; justify-content: flex-end; }
.ufm-ai__user-bubble {
    max-width: min(690px, 88%);
    padding: 13px 17px;
    border: 1px solid #e7e2e3;
    border-radius: 20px 20px 6px 20px;
    background: #efeded;
    color: #242022;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
}
.ufm-ai__turn--assistant { padding: 0 2px; }
.ufm-ai__assistant-head { display: flex; align-items: center; gap: 7px; margin-bottom: 13px; color: #433b3e; font-size: 12.5px; }
.ufm-ai__assistant-mark { width: 25px; height: 25px; border-radius: 8px; background: #fff0f2; font-size: 13px; }
.ufm-ai__model-mini { margin-left: 2px; color: #93898d; font-size: 11px; font-weight: 500; }
.ufm-ai__turn-notice { margin: -2px 0 13px 32px; padding: 9px 11px; border: 1px solid #eadfd4; border-radius: 10px; background: #fffaf3; color: #716458; font-size: 11.5px; line-height: 1.5; }
.ufm-ai__answer { color: #2e292b; font-size: 15.5px; line-height: 1.72; }
.ufm-ai__answer p,
.ufm-ai__answer li,
.ufm-ai__answer blockquote { white-space: pre-wrap; }
.ufm-ai__answer p { margin: 0 0 14px; }
.ufm-ai__answer p:last-child { margin-bottom: 0; }
.ufm-ai__answer-title { margin: 24px 0 9px; color: #1f1b1d; font-size: 17px; line-height: 1.35; font-weight: 760; letter-spacing: -.01em; }
.ufm-ai__answer-title:first-child { margin-top: 0; }
.ufm-ai__answer-list { margin: 8px 0 17px 1.3em; padding: 0; }
.ufm-ai__answer-list li { margin: 0 0 8px; padding-left: 3px; }
.ufm-ai__answer-quote { margin: 14px 0; padding: 10px 14px; border-left: 3px solid #d6a1ac; background: #fff7f8; color: #554b4f; border-radius: 0 10px 10px 0; }
.ufm-ai__inline-code { padding: 1px 5px; border-radius: 5px; background: #f0edef; color: #7b2030; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.ufm-ai__inline-citations { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: .18em; }
.ufm-ai__citation {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f3eef0;
    color: var(--ufm-ai-red) !important;
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    border: 1px solid #e5dadd;
}
.ufm-ai__citation:hover { background: #fae8ec; border-color: #d7a8b2; }

/* Loading y errores. */
.ufm-ai__thinking { display: flex; align-items: center; gap: 9px; margin-left: 32px; color: #756c70; font-size: 13px; }
.ufm-ai__thinking-dots { display: inline-flex; gap: 4px; }
.ufm-ai__thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ufm-ai-red); animation: ufm-ai-dot 1s infinite ease-in-out; }
.ufm-ai__thinking-dots i:nth-child(2) { animation-delay: .12s; }
.ufm-ai__thinking-dots i:nth-child(3) { animation-delay: .24s; }
@keyframes ufm-ai-dot { 0%,100% { opacity:.25; transform:translateY(0); } 50% { opacity:1; transform:translateY(-2px); } }
.ufm-ai__error-card { margin-left: 32px; padding: 12px 14px; border: 1px solid #f0c8cf; border-radius: 12px; background: #fff3f5; color: #8b1a2d; font-size: 13px; line-height: 1.55; }
.ufm-ai__status { width: min(820px, 100%); margin: 0 auto 8px; padding: 9px 12px; border-radius: 10px; font-size: 12px; }
.ufm-ai__status.is-error { color: #8b1a2d; background: #fff2f4; border: 1px solid #efc7cf; }
.ufm-ai__status.is-info { color: #5f575a; background: #f5f2f3; }

/* Fuentes: solo las usadas/citadas por la respuesta. */
.ufm-ai__sources-block { margin: 25px 0 0; }
.ufm-ai__sources-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #4e4649; }
.ufm-ai__sources-heading strong { font-size: 13px; }
.ufm-ai__sources-heading span { color: #958b8f; font-size: 10.5px; }
.ufm-ai__sources { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.ufm-ai__source {
    min-width: 0;
    display: grid;
    grid-template-columns: 28px minmax(0,1fr) 18px;
    align-items: center;
    gap: 9px;
    min-height: 70px;
    padding: 10px 11px;
    border: 1px solid var(--ufm-ai-line);
    border-radius: 14px;
    background: #fff;
    color: var(--ufm-ai-ink) !important;
    text-decoration: none !important;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ufm-ai__source:hover { transform: translateY(-1px); border-color: #d5abb3; box-shadow: 0 9px 25px rgba(38,23,28,.055); }
.ufm-ai__source-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #f5f1f2; color: var(--ufm-ai-red); font-size: 11px; font-weight: 800; }
.ufm-ai__source-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ufm-ai__source-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #91878b; font-size: 10.5px; }
.ufm-ai__source-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #342e31; font-size: 12px; line-height: 1.35; font-weight: 650; }
.ufm-ai__source-arrow { color: #9c9296; font-size: 14px; }
.ufm-ai__related-block { margin-top: 21px; }
.ufm-ai__related-title { display: block; margin-bottom: 9px; color: #4f474a; font-size: 12.5px; }
.ufm-ai__related { display: flex; flex-wrap: wrap; gap: 7px; }
.ufm-ai__answer-disclaimer { margin: 22px 0 0; color: #9a9094; font-size: 10.5px; line-height: 1.55; }

/* Composer tipo AI Mode: siempre disponible para continuar consultando. */
.ufm-ai__composer-wrap {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    padding: 10px clamp(14px, 4vw, 48px) 14px;
    border-top: 1px solid rgba(226,220,222,.82);
    background: linear-gradient(180deg, rgba(250,249,249,.8), rgba(250,249,249,.98) 25%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
.ufm-ai__composer {
    width: min(820px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 8px 8px 8px 16px;
    border: 1px solid #d9d2d4;
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(36,23,28,.09);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.ufm-ai__composer:focus-within { border-color: rgba(181,18,43,.38); box-shadow: 0 13px 38px rgba(81,27,40,.12); }
.ufm-ai__input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    max-height: 144px;
    resize: none;
    overflow-y: auto;
    padding: 10px 3px !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #292326 !important;
    font-size: 14.5px;
    line-height: 1.5;
}
.ufm-ai__input::placeholder { color: #9d9498; }
.ufm-ai__submit {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--ufm-ai-red), #d12b3f);
    color: #fff;
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
    box-shadow: 0 7px 18px rgba(181,18,43,.2);
    transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.ufm-ai__submit:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(181,18,43,.28); }
.ufm-ai__submit:disabled { opacity: .48; cursor: wait; transform: none; }
.ufm-ai__submit:focus-visible { outline: 3px solid rgba(181,18,43,.17); outline-offset: 2px; }
.ufm-ai__composer-meta { width: min(820px, 100%); margin: 7px auto 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ufm-ai__privacy-note, .ufm-ai__powered { margin: 0; color: #958c90; font-size: 9.8px; line-height: 1.45; }
.ufm-ai__privacy-note { max-width: 68%; }
.ufm-ai__privacy-note span { color: #6e6569; }
.ufm-ai__powered { text-align: right; white-space: nowrap; }
.ufm-ai__powered strong { color: #746a6e; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    .ufm-ai *, .ufm-ai *::before, .ufm-ai *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media (max-width: 780px) {
    /* En móvil los tres botones usarán 52x52 y right: 14px. */
    .ufm-ai__launcher,
    .ufm-ai--right-middle .ufm-ai__launcher,
    .ufm-ai--right-bottom .ufm-ai__launcher {
        right: 14px !important;
        left: auto !important;
        top: auto !important;
        bottom: 80px !important;

        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;

        padding: 0 !important;
        transform: none !important;
    }

    .ufm-ai--left-middle .ufm-ai__launcher,
    .ufm-ai--left-bottom .ufm-ai__launcher {
        left: 14px !important;
        right: auto !important;
        top: auto !important;
        bottom: 80px !important;

        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;

        padding: 0 !important;
        transform: none !important;
    }

    .ufm-ai__launcher:hover,
    .ufm-ai--right-middle .ufm-ai__launcher:hover,
    .ufm-ai--right-bottom .ufm-ai__launcher:hover,
    .ufm-ai--left-middle .ufm-ai__launcher:hover,
    .ufm-ai--left-bottom .ufm-ai__launcher:hover {
        transform: none !important;
    }

    .ufm-ai__launcher-orb {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
    }

    .ufm-ai__overlay { padding: 0; place-items: stretch; }
    .ufm-ai__dialog { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
    .ufm-ai__inline-shell { height: 82dvh; min-height: 620px; border-radius: 20px; }
    .ufm-ai__topbar { min-height: 62px; padding: 10px 10px 10px 13px; }
    .ufm-ai__identity-text small { max-width: 180px; }
    .ufm-ai__context-badge { display: none; }
    .ufm-ai__new { width: 38px; padding: 0; justify-content: center; }
    .ufm-ai__new span { display: none; }
    .ufm-ai__close { width: 38px; min-height: 38px; }
    .ufm-ai__conversation { padding: 22px 16px 24px; }
    .ufm-ai__empty { padding: 18px 0 28px; justify-content: flex-start; min-height: auto; margin-top: 8vh; }
    .ufm-ai__title { font-size: clamp(29px, 9vw, 42px); }
    .ufm-ai__subtitle { font-size: 14px; }
    .ufm-ai__chips { justify-content: flex-start; flex-wrap: nowrap; width: 100%; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: none; }
    .ufm-ai__chips::-webkit-scrollbar { display: none; }
    .ufm-ai__chips button { flex: 0 0 auto; }
    .ufm-ai__user-bubble { max-width: 92%; font-size: 14px; }
    .ufm-ai__answer { font-size: 14.5px; line-height: 1.68; }
    .ufm-ai__sources { grid-template-columns: 1fr; }
    .ufm-ai__composer-wrap { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
    .ufm-ai__composer { border-radius: 18px; padding-left: 13px; }
    .ufm-ai__composer-meta { display: block; }
    .ufm-ai__privacy-note { max-width: 100%; }
    .ufm-ai__powered { margin-top: 4px; text-align: left; white-space: normal; }
}


/* ==========================================================
   UFM AI 0.4.3 - Ajustes visuales solicitados
   ========================================================== */
.ufm-ai__ai-mark .ufm-ai__gemini-glyph {
    font-size: 19px;
}

.ufm-ai__empty-mark .ufm-ai__gemini-glyph {
    font-size: 28px;
}

.ufm-ai__assistant-mark .ufm-ai__gemini-glyph {
    font-size: 14px;
}

/* El texto introductorio "Búsqueda institucional con IA" ya no se renderiza.
   Estas reglas solo mantienen los contenedores existentes sin afectar layout. */
.ufm-ai__conversation {
    scroll-behavior: auto;
}


/* ==========================================================
   UFM AI
   Tooltip + alineación final
   ========================================================== */

.ufm-ai__launcher {
    overflow: visible !important;
}


/* Mantener dimensiones y posición ya acordadas */
.ufm-ai--right-middle .ufm-ai__launcher,
.ufm-ai--right-bottom .ufm-ai__launcher {
    position: fixed !important;

    right: 18px !important;
    left: auto !important;

    top: auto !important;
    bottom: 88px !important;

    width: 56px !important;
    height: 56px !important;

    min-width: 56px !important;
    min-height: 56px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;

    transform: none !important;

    box-shadow:
        0 5px 16px rgba(0,0,0,.18) !important;

    transition:
        transform .18s ease,
        box-shadow .18s ease !important;
}


/* El círculo Gemini conserva exactamente 56x56 */
.ufm-ai__launcher-orb {
    width: 56px !important;
    height: 56px !important;

    min-width: 56px !important;
    min-height: 56px !important;

    border-radius: 50% !important;
}


/* Hover */
.ufm-ai--right-middle .ufm-ai__launcher:hover,
.ufm-ai--right-bottom .ufm-ai__launcher:hover {
    transform: scale(1.05) !important;

    box-shadow:
        0 7px 20px rgba(0,0,0,.24) !important;
}


/* ==========================================================
   TOOLTIP BÚSQUEDA IA
   ========================================================== */

/*.ufm-ai__launcher::before {
    content: "Búsqueda con Gemini" !important;

    position: absolute !important;

    right: calc(100% + 11px) !important;
    left: auto !important;

    top: 50% !important;

    transform:
        translateY(-50%)
        translateX(4px) !important;

    padding: 7px 11px !important;

    background: #174f7c !important;
    color: #ffffff !important;

    border-radius: 4px !important;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;

    white-space: nowrap !important;

    box-shadow:
        0 4px 12px rgba(0,0,0,.18) !important;

    opacity: 0 !important;
    visibility: hidden !important;

    pointer-events: none !important;

    transition:
        opacity .16s ease,
        transform .16s ease,
        visibility .16s ease !important;

    z-index: 2147481100 !important;
}*/

.ufm-ai__launcher::before {
    content: "Búsqueda con Gemini" !important;

    position: absolute !important;

    right: calc(100% + 11px) !important;
    left: auto !important;

    top: 50% !important;

    transform: translateY(-50%) !important;

    padding: 7px 11px !important;

    background: #174f7c !important;
    color: #ffffff !important;

    border-radius: 4px !important;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;

    white-space: nowrap !important;

    box-shadow:
        0 4px 12px rgba(0,0,0,.18) !important;

    opacity: 1 !important;
    visibility: visible !important;

    pointer-events: none !important;

    z-index: 2147481100 !important;
}


/* Flecha */
.ufm-ai__launcher::after {
    content: "" !important;

    position: absolute !important;

    right: calc(100% + 5px) !important;
    top: 50% !important;

    transform: translateY(-50%) !important;

    border-width: 6px 0 6px 6px !important;
    border-style: solid !important;

    border-color:
        transparent
        transparent
        transparent
        #174f7c !important;

    opacity: 0 !important;
    visibility: hidden !important;

    pointer-events: none !important;

    transition:
        opacity .16s ease,
        visibility .16s ease !important;
}


/* Mostrar tooltip */
.ufm-ai__launcher:hover::before,
.ufm-ai__launcher:focus-visible::before {
    opacity: 1 !important;
    visibility: visible !important;

    transform:
        translateY(-50%)
        translateX(0) !important;
}

.ufm-ai__launcher:hover::after,
.ufm-ai__launcher:focus-visible::after {
    opacity: 1 !important;
    visibility: visible !important;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media only screen and (max-width: 780px) {

    .ufm-ai--right-middle .ufm-ai__launcher,
    .ufm-ai--right-bottom .ufm-ai__launcher {
        right: 14px !important;
        left: auto !important;

        top: auto !important;
        bottom: 80px !important;

        width: 52px !important;
        height: 52px !important;

        min-width: 52px !important;
        min-height: 52px !important;

        transform: none !important;
    }

    .ufm-ai__launcher-orb {
        width: 52px !important;
        height: 52px !important;

        min-width: 52px !important;
        min-height: 52px !important;
    }

    .ufm-ai__launcher::before,
    .ufm-ai__launcher::after {
        display: none !important;
    }
}

/* ==========================================================
   UFM AI - SOLO PÁGINAS INTERNAS SIN COOKIEYES
   ========================================================== */

/* Desktop */
.ufm-ai-internal-page .ufm-ai--right-middle .ufm-ai__launcher,
.ufm-ai-internal-page .ufm-ai--right-bottom .ufm-ai__launcher {
    right: 18px !important;
    left: auto !important;

    top: auto !important;
    bottom: 18px !important;
}


/* Mobile */
@media only screen and (max-width: 780px) {

    .ufm-ai-internal-page .ufm-ai--right-middle .ufm-ai__launcher,
    .ufm-ai-internal-page .ufm-ai--right-bottom .ufm-ai__launcher {
        right: 14px !important;
        left: auto !important;

        top: auto !important;
        bottom: 14px !important;
    }
}
