/*==================================================
EQUIS CONSTRUCTION LLC
ISOLATED CHATBOT
==================================================*/

:root {
    --equis-chat-green: #25d366;
    --equis-chat-green-dark: #128c7e;
    --equis-chat-header: #11100f;
    --equis-chat-bg: #0b0b0b;
    --equis-chat-surface: #161513;
    --equis-chat-user: #70202a;
    --equis-chat-bot: #1d1b18;
    --equis-chat-gold: #d9a43b;
    --equis-chat-border: rgba(217, 164, 59, .22);
    --equis-chat-text: #f7f3ed;
    --equis-chat-muted: #b8b1a8;
}

.eqxchat-shell,
.eqxchat-shell * {
    box-sizing: border-box;
}

.eqxchat-sr-only {
    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;
}

.eqxchat-launcher {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 9998;

    min-width: 222px;
    height: 66px;

    padding: 8px 12px 8px 8px;

    border: 1px solid rgba(217, 164, 59, .34);
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(123, 25, 35, .16),
            rgba(8, 8, 8, .98) 45%
        );

    color: #fff;

    display: flex;
    align-items: center;
    gap: 10px;

    cursor: pointer;

    box-shadow:
        0 16px 42px rgba(0, 0, 0, .38),
        inset 0 1px 0 rgba(255, 255, 255, .035);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.eqxchat-launcher:hover {
    transform: translateY(-3px);
    border-color: rgba(217, 164, 59, .68);

    background:
        linear-gradient(
            135deg,
            rgba(123, 25, 35, .25),
            rgba(8, 8, 8, 1) 48%
        );

    box-shadow:
        0 20px 52px rgba(0, 0, 0, .48),
        inset 0 1px 0 rgba(255, 255, 255, .05);
}

.eqxchat-launcher-logo {
    position: relative;

    width: 50px;
    height: 50px;

    flex: 0 0 50px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(217, 164, 59, .09),
            rgba(0, 0, 0, .92)
        );

    border: 1px solid rgba(217, 164, 59, .30);

    overflow: visible;
}

.eqxchat-launcher-logo img {
    display: block;
    width: 43px;
    height: 43px;
    object-fit: contain;
    padding: 3px;
}

.eqxchat-launcher-status {
    position: absolute;
    right: -2px;
    bottom: -2px;

    width: 12px;
    height: 12px;

    border-radius: 50%;

    background: #25d366;
    border: 3px solid #0b0b0b;

    box-shadow: 0 0 0 2px rgba(37, 211, 102, .08);
}

.eqxchat-launcher-copy {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;

    text-align: left;
}

.eqxchat-launcher-copy small {
    margin: 0 0 3px;

    color: #aaa39b;

    font: 500 10px/1.1 Arial, sans-serif;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.eqxchat-launcher-copy strong {
    color: #f6f1e9;

    font: 700 14px/1.15 Arial, sans-serif;
    white-space: nowrap;
}

.eqxchat-launcher-arrow {
    width: 28px;
    height: 28px;

    flex: 0 0 28px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    color: #d9a43b;

    background: rgba(217, 164, 59, .08);
    border: 1px solid rgba(217, 164, 59, .18);

    transition:
        transform .25s ease,
        background .25s ease;
}

.eqxchat-launcher:hover .eqxchat-launcher-arrow {
    transform: translateX(2px);
    background: rgba(217, 164, 59, .14);
}

.eqxchat-launcher-arrow svg {
    width: 15px;
    height: 15px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eqxchat-notification {
    position: absolute;
    top: -6px;
    right: -6px;

    min-width: 21px;
    height: 21px;
    padding: 0 6px;

    border-radius: 999px;

    display: grid;
    place-items: center;

    background: #7b1923;
    color: #fff;

    border: 2px solid #070707;

    font: 700 10px/1 Arial, sans-serif;
}

.eqxchat-panel {
    position: fixed;
    right: 24px;
    bottom: 98px;
    z-index: 9999;
    width: min(390px, calc(100vw - 32px));
    height: min(650px, calc(100dvh - 130px));
    min-height: 470px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--equis-chat-bg);
    border: 1px solid var(--equis-chat-border);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .58);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.97);
    transform-origin: right bottom;
    transition:
        opacity .25s ease,
        visibility .25s ease,
        transform .25s ease;
}

.eqxchat-panel.eqxchat-is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.eqxchat-header {
    min-height: 76px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background:
        linear-gradient(135deg, rgba(123, 25, 35, .82), rgba(17, 16, 15, .96)),
        var(--equis-chat-header);
    border-bottom: 1px solid rgba(217, 164, 59, .28);
}

.eqxchat-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    overflow: visible;
    border: 1px solid rgba(217, 164, 59, .55);
    background: #080808;
}

.eqxchat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 4px;
}

.eqxchat-online-dot {
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--equis-chat-green);
    border: 2px solid #11100f;
}

.eqxchat-header-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.eqxchat-header-copy strong {
    color: #fff;
    font: 700 15px/1.25 Arial, sans-serif;
}

.eqxchat-header-copy span {
    color: rgba(255, 255, 255, .74);
    font: 400 11px/1.3 Arial, sans-serif;
}

.eqxchat-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.eqxchat-close:hover {
    background: rgba(255, 255, 255, .08);
}

.eqxchat-close svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.eqxchat-body {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 13px 12px 16px;
    background:
        radial-gradient(circle at 10% 5%, rgba(217, 164, 59, .06), transparent 25%),
        radial-gradient(circle at 90% 60%, rgba(123, 25, 35, .08), transparent 30%),
        #0d0d0d;
    scrollbar-width: thin;
    scrollbar-color: #3a3530 transparent;
}

.eqxchat-day {
    width: max-content;
    margin: 0 auto 10px;
    padding: 5px 9px;
    border-radius: 7px;
    color: var(--equis-chat-muted);
    background: rgba(28, 27, 25, .9);
    font: 600 10px/1 Arial, sans-serif;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.eqxchat-security {
    max-width: 92%;
    margin: 0 auto 14px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: #9f978e;
    background: rgba(36, 32, 27, .92);
    border-radius: 7px;
    font: 400 9px/1.4 Arial, sans-serif;
}

.eqxchat-security svg {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    fill: none;
    stroke: var(--equis-chat-gold);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eqxchat-messages {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.eqxchat-message-row {
    display: flex;
    width: 100%;
}

.eqxchat-message-row.bot {
    justify-content: flex-start;
}

.eqxchat-message-row.user {
    justify-content: flex-end;
}

.eqxchat-message {
    position: relative;
    max-width: 86%;
    padding: 9px 10px 7px;
    color: var(--equis-chat-text);
    border-radius: 9px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .16);
    font: 400 13px/1.45 Arial, sans-serif;
    white-space: pre-line;
}

.eqxchat-message-row.bot .eqxchat-message {
    background: var(--equis-chat-bot);
    border: 1px solid rgba(255, 255, 255, .045);
    border-top-left-radius: 3px;
}

.eqxchat-message-row.user .eqxchat-message {
    background: var(--equis-chat-user);
    border: 1px solid rgba(217, 164, 59, .14);
    border-top-right-radius: 3px;
}

.eqxchat-message-text a {
    color: #f1c762;
    font-weight: 700;
    text-decoration: none;
}

.eqxchat-message-meta {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    color: rgba(255, 255, 255, .54);
    font: 400 9px/1 Arial, sans-serif;
}

.eqxchat-checks {
    color: #57b7ff;
    letter-spacing: -3px;
    font-size: 11px;
    padding-right: 2px;
}

.eqxchat-typing-row {
    display: flex;
    justify-content: flex-start;
}

.eqxchat-typing {
    width: 58px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--equis-chat-bot);
    border-radius: 9px 9px 9px 3px;
}

.eqxchat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #918981;
    animation: waTyping 1.1s infinite ease-in-out;
}

.eqxchat-typing span:nth-child(2) {
    animation-delay: .15s;
}

.eqxchat-typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes waTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: .45;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.eqxchat-quick-replies {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.eqxchat-quick-reply {
    border: 1px solid rgba(217, 164, 59, .45);
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(217, 164, 59, .06);
    color: #e4bd67;
    cursor: pointer;
    font: 600 11px/1.2 Arial, sans-serif;
    transition: .2s ease;
}

.eqxchat-quick-reply:hover {
    background: rgba(217, 164, 59, .14);
    border-color: rgba(217, 164, 59, .8);
    color: #f2d289;
}

.eqxchat-compose {
    flex: 0 0 auto;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #11100f;
    border-top: 1px solid rgba(255, 255, 255, .055);
}

.eqxchat-input-wrap {
    flex: 1;
    min-width: 0;
}

.eqxchat-input-wrap input {
    width: 100%;
    height: 43px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 999px;
    padding: 0 15px;
    outline: none;
    background: #1b1a18;
    color: #fff;
    font: 400 13px/1 Arial, sans-serif;
}

.eqxchat-input-wrap input::placeholder {
    color: #8f8881;
}

.eqxchat-input-wrap input:focus {
    border-color: rgba(217, 164, 59, .5);
}

.eqxchat-send {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: var(--equis-chat-green);
    color: #fff;
}

.eqxchat-send svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eqxchat-footer {
    flex: 0 0 auto;
    padding: 7px 12px 10px;
    text-align: center;
    background: #11100f;
}

.eqxchat-whatsapp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #a9a39b;
    text-decoration: none;
    font: 600 10px/1.2 Arial, sans-serif;
}

.eqxchat-whatsapp-link:hover {
    color: var(--equis-chat-green);
}

.eqxchat-whatsapp-link svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 600px) {
    .eqxchat-launcher {
        right: 14px;
        bottom: 14px;

        min-width: 184px;
        height: 58px;

        padding: 7px 10px 7px 7px;

        border-radius: 16px;
    }

    .eqxchat-launcher-logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 12px;
    }

    .eqxchat-launcher-logo img {
        width: 38px;
        height: 38px;
    }

    .eqxchat-launcher-copy small {
        font-size: 8px;
    }

    .eqxchat-launcher-copy strong {
        font-size: 12px;
    }

    .eqxchat-launcher-arrow {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
    }

.eqxchat-panel {
        right: 10px;
        bottom: 84px;
        width: calc(100vw - 20px);
        height: min(680px, calc(100dvh - 100px));
        border-radius: 16px;
    }
}


/*==================================================
V4 - LAUNCHER ISOLATION / THEME CONFLICT FIX
Load chatbot.css AFTER your main style.css.
These rules prevent global button/image/pseudo-element
styles from distorting the chatbot launcher.
==================================================*/

.eqxchat-shell .eqxchat-launcher {
    appearance: none !important;
    -webkit-appearance: none !important;

    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    z-index: 99998 !important;

    width: auto !important;
    min-width: 222px !important;
    max-width: 270px !important;
    height: 66px !important;
    min-height: 66px !important;

    margin: 0 !important;
    padding: 8px 12px 8px 8px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;

    overflow: visible !important;

    border: 1px solid rgba(217, 164, 59, .34) !important;
    border-radius: 18px !important;

    background:
        linear-gradient(
            135deg,
            rgba(123, 25, 35, .18),
            rgba(8, 8, 8, .98) 48%
        ) !important;

    color: #ffffff !important;
    text-align: left !important;
    text-decoration: none !important;

    box-shadow:
        0 16px 42px rgba(0, 0, 0, .38),
        inset 0 1px 0 rgba(255, 255, 255, .035) !important;

    transform: none;
    cursor: pointer !important;
    isolation: isolate;
}

/* Kill decorative circles / sweeps from global button styles */
.eqxchat-shell .eqxchat-launcher::before,
.eqxchat-shell .eqxchat-launcher::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Reset children from global button span rules */
.eqxchat-shell .eqxchat-launcher > span {
    position: relative;
    inset: auto;
    margin: 0;
    padding: 0;
    transform: none;
}

/* Logo box */
.eqxchat-shell .eqxchat-launcher-logo {
    position: relative !important;

    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;

    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;

    flex: 0 0 50px !important;

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

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

    overflow: hidden !important;

    border: 1px solid rgba(217, 164, 59, .30) !important;
    border-radius: 13px !important;

    background: #0a0a0a !important;

    box-shadow: none !important;
    transform: none !important;
}

/* Critical image isolation */
.eqxchat-shell .eqxchat-launcher-logo img {
    position: static !important;

    display: block !important;

    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;

    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;

    margin: 0 !important;
    padding: 2px !important;

    object-fit: contain !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

/* Green availability dot */
.eqxchat-shell .eqxchat-launcher-status {
    position: absolute !important;
    right: -2px !important;
    bottom: -2px !important;
    left: auto !important;
    top: auto !important;

    width: 11px !important;
    min-width: 11px !important;
    max-width: 11px !important;

    height: 11px !important;
    min-height: 11px !important;
    max-height: 11px !important;

    border-radius: 50% !important;
    background: #25d366 !important;
    border: 2px solid #0b0b0b !important;
}

/* Text */
.eqxchat-shell .eqxchat-launcher-copy {
    position: static !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;

    line-height: normal !important;
}

.eqxchat-shell .eqxchat-launcher-copy small {
    display: block !important;
    margin: 0 0 3px !important;
    padding: 0 !important;

    color: #aaa39b !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;

    letter-spacing: .55px !important;
    text-transform: uppercase !important;
}

.eqxchat-shell .eqxchat-launcher-copy strong {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;

    color: #f6f1e9 !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;

    white-space: nowrap !important;
}

/* Minimal arrow */
.eqxchat-shell .eqxchat-launcher-arrow {
    position: static !important;

    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;

    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;

    flex: 0 0 28px !important;

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

    margin-left: auto !important;

    color: #d9a43b !important;

    background: rgba(217, 164, 59, .08) !important;
    border: 1px solid rgba(217, 164, 59, .18) !important;
    border-radius: 9px !important;
}

.eqxchat-shell .eqxchat-launcher-arrow svg {
    display: block !important;

    width: 15px !important;
    max-width: 15px !important;

    height: 15px !important;
    max-height: 15px !important;

    fill: none !important;
    stroke: currentColor !important;
}

/* Notification */
.eqxchat-shell .eqxchat-notification {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    left: auto !important;
    bottom: auto !important;

    width: auto !important;
    min-width: 21px !important;
    max-width: none !important;

    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;

    padding: 0 6px !important;

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

    border: 2px solid #070707 !important;
    border-radius: 999px !important;

    background: #7b1923 !important;
    color: #ffffff !important;

    font: 700 10px/1 Arial, sans-serif !important;

    transform: none !important;
}

/* Keep chat above the isolated launcher */
.eqxchat-shell .eqxchat-panel {
    z-index: 99999 !important;
}

@media (max-width: 600px) {
    .eqxchat-shell .eqxchat-launcher {
        right: 14px !important;
        bottom: 14px !important;

        min-width: 178px !important;
        max-width: 210px !important;

        height: 58px !important;
        min-height: 58px !important;

        padding: 7px 9px 7px 7px !important;

        border-radius: 15px !important;
    }

    .eqxchat-shell .eqxchat-launcher-logo {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;

        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;

        flex-basis: 44px !important;
    }

    .eqxchat-shell .eqxchat-launcher-logo img {
        width: 37px !important;
        min-width: 37px !important;
        max-width: 37px !important;

        height: 37px !important;
        min-height: 37px !important;
        max-height: 37px !important;
    }

    .eqxchat-shell .eqxchat-launcher-copy small {
        font-size: 8px !important;
    }

    .eqxchat-shell .eqxchat-launcher-copy strong {
        font-size: 12px !important;
    }

    .eqxchat-shell .eqxchat-launcher-arrow {
        width: 25px !important;
        min-width: 25px !important;
        max-width: 25px !important;

        height: 25px !important;
        min-height: 25px !important;
        max-height: 25px !important;

        flex-basis: 25px !important;
    }
}
