/* Asistente RUGOZ — misma identidad que el storefront 2026 */

#rugoz-ai-root { display: none; }

.rugoz-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}
.rugoz-brand-mark img,
.rugoz-mark-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rugoz-toggle {
    position: fixed; right: 20px; bottom: 20px; z-index: 2147483000;
    width: 62px; height: 62px; border-radius: 18px; border: 1px solid rgba(0, 232, 218, 0.35);
    cursor: pointer;
    background: linear-gradient(160deg, #0057B8 0%, #061018 100%);
    box-shadow: 0 12px 32px rgba(0, 87, 184, .42);
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.rugoz-toggle:hover { transform: translateY(-2px) scale(1.03); }
.rugoz-toggle-logo { width: 36px; height: 36px; line-height: 1; }
.rugoz-badge {
    position: absolute; top: 8px; right: 8px; width: 10px; height: 10px;
    background: #B5BD00; border-radius: 50%; border: 2px solid #061018;
}

.rugoz-chat {
    position: fixed; right: 20px; bottom: 96px; z-index: 2147483000;
    width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 120px);
    background: #0E1624; border-radius: 22px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
    display: flex; flex-direction: column;
    opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
    color: #E8EEF8;
}
.rugoz-chat.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.rugoz-header {
    background: linear-gradient(135deg, #0057B8 0%, #061018 100%); color: #fff;
    padding: 14px 16px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid rgba(0, 232, 218, 0.2);
}
.rugoz-header-avatar {
    width: 40px; height: 40px; border-radius: 12px;
    background: #0B1220; box-sizing: border-box; padding: 4px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.rugoz-header-info { flex: 1; }
.rugoz-header-info h4 {
    margin: 0; font-size: 15px; font-weight: 700;
    font-family: "Outfit", "Segoe UI", sans-serif;
}
.rugoz-header-info span { font-size: 12px; opacity: .85; }
.rugoz-header-info span::before {
    content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #B5BD00; margin-right: 6px;
}
.rugoz-header-minimize {
    background: transparent; border: none; color: #fff; cursor: pointer;
    width: 32px; height: 32px; border-radius: 8px; opacity: .9;
}
.rugoz-header-minimize:hover { background: rgba(255, 255, 255, .12); }
.rugoz-header-minimize svg { width: 22px; height: 22px; fill: currentColor; }

.rugoz-body { flex: 1; display: flex; flex-direction: column; background: #070B12; overflow: hidden; }
.rugoz-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.rugoz-msg { display: flex; gap: 8px; max-width: 88%; }
.rugoz-msg.user { align-self: flex-end; }
.rugoz-msg.bot { align-self: flex-start; }
.rugoz-msg-avatar {
    width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
    background: #0E1624; border: 1px solid rgba(0, 232, 218, .35);
    box-sizing: border-box; padding: 4px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.rugoz-bubble {
    padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; word-wrap: break-word;
}
.rugoz-msg.bot .rugoz-bubble {
    background: #0E1624; color: #E8EEF8; border-bottom-left-radius: 4px;
    border: 1px solid rgba(255,255,255,.08);
}
.rugoz-msg.user .rugoz-bubble { background: #0057B8; color: #fff; border-bottom-right-radius: 4px; }
.rugoz-time { font-size: 10px; color: #8B97AB; margin-top: 3px; padding: 0 4px; }
.rugoz-msg.user .rugoz-time { text-align: right; }

.rugoz-typing { display: none; align-items: center; gap: 8px; padding: 0 16px 6px; }
.rugoz-typing.show { display: flex; }
.rugoz-typing-dots {
    background: #0E1624; border-radius: 14px; padding: 12px 14px; display: flex; gap: 4px;
    border: 1px solid rgba(255,255,255,.08);
}
.rugoz-typing-dots span { width: 7px; height: 7px; background: #00E8DA; border-radius: 50%; animation: rugozBounce 1.2s infinite; opacity: .5; }
.rugoz-typing-dots span:nth-child(2) { animation-delay: .2s; }
.rugoz-typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes rugozBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.rugoz-quick { padding: 0 16px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.rugoz-quick-btn {
    background: transparent; border: 1px solid rgba(0, 232, 218, .35); color: #00E8DA;
    border-radius: 999px; padding: 7px 13px; font-size: 13px; cursor: pointer;
}
.rugoz-quick-btn:hover { background: #0057B8; color: #fff; border-color: #0057B8; }

.rugoz-input-area {
    display: flex; align-items: flex-end; gap: 8px; padding: 12px;
    background: #0E1624; border-top: 1px solid rgba(255,255,255,.08);
}
.rugoz-input {
    flex: 1; resize: none; border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
    padding: 10px 14px; font-size: 14px; font-family: inherit; max-height: 96px; outline: none;
    background: #070B12; color: #E8EEF8;
}
.rugoz-input:focus { border-color: #00E8DA; }
.rugoz-send {
    width: 42px; height: 42px; border-radius: 14px; border: none; cursor: pointer; flex-shrink: 0;
    background: #0057B8; color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.rugoz-send svg { width: 20px; height: 20px; fill: currentColor; }
.rugoz-send:hover { filter: brightness(1.08); }

.rugoz-chat-footer { text-align: center; font-size: 11px; color: #8B97AB; padding: 6px; background: #0E1624; }
.rugoz-chat-footer strong { color: #B5BD00; }

@media (max-width: 480px) {
    .rugoz-chat {
        right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0;
    }
    .rugoz-chat.rugoz-keyboard-open { height: var(--rugoz-vv-height, 100dvh); }
    body.rugoz-chat-open { overflow: hidden; }
}
