/* =========================================================
   TAXPOLIS AI CHATBOT
   Complete Responsive CSS
========================================================= */


/* =========================================================
   CHAT FLOATING BUTTON
========================================================= */

#taxpolis-chat-button {

    position: fixed;

    left: 25px;
    bottom: 25px;

    width: 64px;
    height: 64px;

    padding: 0;

    border: 3px solid #ffffff;
    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #0879df 0%,
        #1268c9 100%
    );

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 1000000;

    box-shadow:
        0 10px 30px rgba(8, 121, 223, 0.32);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


#taxpolis-chat-button:hover {

    transform: translateY(-3px) scale(1.04);

    box-shadow:
        0 15px 35px rgba(8, 121, 223, 0.42);
}


#taxpolis-chat-button img {

    width: 42px;
    height: 42px;

    object-fit: contain;

    display: block;
}


/* ONLINE INDICATOR */

.taxpolis-chat-pulse {

    position: absolute;

    right: -1px;
    top: -1px;

    width: 14px;
    height: 14px;

    background: #18b96a;

    border: 3px solid #ffffff;

    border-radius: 50%;

    box-sizing: border-box;
}




/* =========================================================
   CHAT WINDOW — HEIGHT AND LAYOUT FIX
========================================================= */

#taxpolis-chat-window {
    position: fixed !important;
    left: 25px !important;
    right: auto !important;
    top: 105px !important;
    bottom: 20px !important;

    width: 390px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    display: none;
    flex-direction: column !important;

    box-sizing: border-box !important;
    overflow: hidden !important;

    background: #ffffff;
    border: 1px solid #e4edf6;
    border-radius: 20px;
    z-index: 999999 !important;

    box-shadow:
        0 22px 60px rgba(16, 45, 79, 0.20),
        0 5px 18px rgba(16, 45, 79, 0.10);

    animation: taxpolisChatOpen 0.25s ease;
}

/* OPEN STATE */
#taxpolis-chat-window.active {
    display: flex !important;
}

/* Header remains at the top */
#taxpolis-chat-window .taxpolis-chat-header {
    flex: 0 0 auto !important;
}

/* Conversation uses remaining space and scrolls */
#taxpolis-chat-window .taxpolis-chat-body {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Footer stays visible at the bottom */
#taxpolis-chat-window .taxpolis-chat-input-area {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    position: relative !important;
    bottom: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

/* Open animation */
@keyframes taxpolisChatOpen {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile layout */
@media (max-width: 600px) {
    #taxpolis-chat-window {
        left: 10px !important;
        right: 10px !important;
        top: 80px !important;
        bottom: 10px !important;
        width: auto !important;
    }
}



/* =========================================================
   CHAT HEADER / BANNER
========================================================= */

.taxpolis-chat-header {

    position: relative;

    min-height: 72px;

    padding: 15px 17px;

    background:
        linear-gradient(
            135deg,
            #0879df 0%,
            #1268c9 55%,
            #0d4fa4 100%
        );

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: space-between;

    overflow: hidden;

    flex-shrink: 0;
}


/* Decorative background circle */

.taxpolis-chat-header::after {

    content: "";

    position: absolute;

    width: 160px;
    height: 160px;

    right: -70px;
    top: -95px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.08);

    pointer-events: none;
}


/* Second decorative shape */

.taxpolis-chat-header::before {

    content: "";

    position: absolute;

    width: 80px;
    height: 80px;

    right: 75px;
    bottom: -65px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.05);

    pointer-events: none;
}


/* =========================================================
   CHAT BRAND
========================================================= */

.taxpolis-chat-brand {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;
}


/* =========================================================
   CUSTOM LOGO CONTAINER
========================================================= */

.taxpolis-chat-logo {

    width: 43px;
    height: 43px;

    min-width: 43px;

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.14);

    border:
        1px solid rgba(255, 255, 255, 0.20);

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    box-sizing: border-box;
}


.taxpolis-chat-logo img {

    width: 34px;
    height: 34px;

    object-fit: contain;

    display: block;
}


/* =========================================================
   CHAT TITLE
========================================================= */

.taxpolis-chat-title {

    font-size: 15px;

    line-height: 1.2;

    font-weight: 750;

    color: #ffffff;

    white-space: nowrap;
}


/* =========================================================
   ONLINE STATUS
========================================================= */

.taxpolis-chat-status {

    margin-top: 4px;

    font-size: 10.5px;

    line-height: 1.2;

    color:
        rgba(255, 255, 255, 0.88);

    display: flex;

    align-items: center;

    gap: 5px;

    white-space: nowrap;
}


.taxpolis-chat-status-dot {

    width: 7px;
    height: 7px;

    min-width: 7px;

    border-radius: 50%;

    background: #38dc84;

    box-shadow:
        0 0 0 3px
        rgba(56, 220, 132, 0.12);
}


/* =========================================================
   HEADER ACTION BUTTONS
========================================================= */

.taxpolis-chat-actions {

    position: relative;

    z-index: 3;

    display: flex;

    align-items: center;

    gap: 6px;

    margin-left: 10px;
}


.taxpolis-chat-action {

    width: 32px;
    height: 32px;

    padding: 0;

    border: 0;

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.13);

    color: #ffffff;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.taxpolis-chat-action:hover {

    background:
        rgba(255, 255, 255, 0.24);

    transform: translateY(-1px);
}


.taxpolis-chat-action i {

    font-size: 13px;
}


/* =========================================================
   CHAT BODY
========================================================= */

.taxpolis-chat-body {

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 18px;

    background:
        #f7faff;

    scroll-behavior: smooth;
}


/* CUSTOM SCROLLBAR */

.taxpolis-chat-body::-webkit-scrollbar {

    width: 5px;
}


.taxpolis-chat-body::-webkit-scrollbar-track {

    background: transparent;
}


.taxpolis-chat-body::-webkit-scrollbar-thumb {

    background: #cbd9e8;

    border-radius: 20px;
}


/* =========================================================
   MESSAGE ROW
========================================================= */

.taxpolis-message {

    display: flex;

    width: 100%;

    margin-bottom: 14px;
}


.taxpolis-message.bot {

    justify-content: flex-start;

    align-items: flex-end;
}


.taxpolis-message.user {

    justify-content: flex-end;

    align-items: flex-end;
}


/* =========================================================
   MESSAGE BUBBLE
========================================================= */

.taxpolis-message-bubble {

    max-width: 82%;

    padding: 11px 14px;

    border-radius: 14px;

    font-size: 13px;

    line-height: 1.55;

    word-wrap: break-word;

    overflow-wrap: anywhere;
}


/* BOT */

.taxpolis-message.bot
.taxpolis-message-bubble {

    background: #ffffff;

    color: #29435f;

    border:
        1px solid #e3ebf4;

    border-bottom-left-radius: 5px;

    box-shadow:
        0 2px 6px rgba(16, 45, 79, 0.03);
}


/* USER */

.taxpolis-message.user
.taxpolis-message-bubble {

    background:
        linear-gradient(
            135deg,
            #0879df,
            #1268c9
        );

    color: #ffffff;

    border-bottom-right-radius: 5px;

    box-shadow:
        0 3px 10px
        rgba(8, 121, 223, 0.15);
}


/* =========================================================
   BOT AVATAR
========================================================= */

.taxpolis-bot-avatar {

    width: 30px;
    height: 30px;

    min-width: 30px;

    margin-right: 8px;

    border-radius: 9px;

    background: #eaf5ff;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    box-sizing: border-box;
}


.taxpolis-bot-avatar img {

    width: 22px;
    height: 22px;

    object-fit: contain;

    display: block;
}


/* =========================================================
   QUICK REPLIES
========================================================= */

.taxpolis-quick-replies {

    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 3px;

    margin-bottom: 15px;
}


.taxpolis-quick-reply {

    padding: 8px 12px;

    border:
        1px solid #cfe4f8;

    border-radius: 20px;

    background: #ffffff;

    color: #0879df;

    font-family: inherit;

    font-size: 11px;

    line-height: 1.2;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.taxpolis-quick-reply:hover {

    background: #eef7ff;

    border-color: #0879df;

    transform: translateY(-1px);
}


.taxpolis-quick-reply:active {

    transform: translateY(0);
}


/* =========================================================
   TYPING INDICATOR
========================================================= */

.taxpolis-typing {

    display: none;

    align-items: center;

    gap: 4px;

    margin-bottom: 13px;
}


.taxpolis-typing.active {

    display: flex;
}


.taxpolis-typing span {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #9db0c5;

    animation:
        taxpolisTyping 1.2s infinite;
}


.taxpolis-typing span:nth-child(2) {

    animation-delay: 0.15s;
}


.taxpolis-typing span:nth-child(3) {

    animation-delay: 0.30s;
}


@keyframes taxpolisTyping {

    0%,
    60%,
    100% {

        transform:
            translateY(0);

        opacity: 0.55;
    }

    30% {

        transform:
            translateY(-4px);

        opacity: 1;
    }
}


/* =========================================================
   INPUT AREA
========================================================= */

.taxpolis-chat-input-area {

    padding: 12px;

    background: #ffffff;

    border-top:
        1px solid #e7eef6;

    flex-shrink: 0;
}


/* =========================================================
   INPUT BOX
========================================================= */

.taxpolis-chat-input-box {

    display: flex;

    align-items: center;

    gap: 7px;

    padding: 5px;

    background: #f5f8fc;

    border:
        1px solid #e0e9f2;

    border-radius: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.taxpolis-chat-input-box:focus-within {

    border-color: #0879df;

    box-shadow:
        0 0 0 3px
        rgba(8, 121, 223, 0.08);
}


/* =========================================================
   INPUT
========================================================= */

#taxpolis-chat-input {

    flex: 1;

    min-width: 0;

    height: 38px;

    padding: 0 9px;

    border: 0;

    outline: 0;

    background: transparent;

    color: #203b57;

    font-family: inherit;

    font-size: 13px;
}


#taxpolis-chat-input::placeholder {

    color: #9aaabd;
}


#taxpolis-chat-input:focus {

    outline: none;
}


/* =========================================================
   SEND BUTTON
========================================================= */

#taxpolis-chat-send {

    width: 38px;
    height: 38px;

    min-width: 38px;

    padding: 0;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #0879df,
            #1268c9
        );

    color: #ffffff;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}


#taxpolis-chat-send:hover {

    background:
        linear-gradient(
            135deg,
            #066bc7,
            #0d59ae
        );

    transform: translateY(-1px);
}


#taxpolis-chat-send:active {

    transform: translateY(0);
}


#taxpolis-chat-send i {

    font-size: 13px;
}


/* =========================================================
   CHAT FOOTER NOTE
========================================================= */

.taxpolis-chat-note {

    margin-top: 7px;

    text-align: center;

    font-size: 9px;

    line-height: 1.2;

    color: #9aaabd;
}


/* =========================================================
   DESKTOP / LAPTOP
========================================================= */

@media (min-width: 1200px) {

    #taxpolis-chat-window {

        left: 25px;

        top: 125px;

        bottom: 95px;

        width: 390px;

        max-height:
            calc(100vh - 220px);
    }

}


/* =========================================================
   SMALL LAPTOP
========================================================= */

@media (min-width: 769px)
       and (max-width: 1199px) {

    #taxpolis-chat-window {

        left: 20px;

        top: 115px;

        bottom: 90px;

        width: 370px;

        max-height:
            calc(100vh - 205px);
    }


    #taxpolis-chat-button {

        left: 20px;

        bottom: 20px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 768px) {

    #taxpolis-chat-window {

        left: 15px;

        right: 15px;

        top: 85px;

        bottom: 85px;

        width: auto;

        min-height: 0;

        max-height:
            calc(100vh - 170px);

        border-radius: 18px;
    }


    #taxpolis-chat-button {

        left: 18px;

        bottom: 18px;

        width: 60px;

        height: 60px;
    }


    #taxpolis-chat-button img {

        width: 39px;

        height: 39px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    #taxpolis-chat-window {

        left: 10px;

        right: 10px;

        top: 75px;

        bottom: 80px;

        width: auto;

        height: auto;

        min-height: 0;

        max-height:
            calc(100vh - 155px);

        border-radius: 18px;
    }


    .taxpolis-chat-header {

        min-height: 66px;

        padding: 13px 14px;
    }


    .taxpolis-chat-logo {

        width: 39px;

        height: 39px;

        min-width: 39px;

        border-radius: 10px;
    }


    .taxpolis-chat-logo img {

        width: 30px;

        height: 30px;
    }


    .taxpolis-chat-title {

        font-size: 14px;
    }


    .taxpolis-chat-status {

        font-size: 9.5px;
    }


    .taxpolis-chat-action {

        width: 30px;

        height: 30px;
    }


    .taxpolis-chat-body {

        padding: 14px;
    }


    .taxpolis-message-bubble {

        max-width: 86%;

        font-size: 12.5px;

        padding: 10px 12px;
    }


    .taxpolis-chat-input-area {

        padding: 10px;
    }


    #taxpolis-chat-button {

        left: 18px;

        bottom: 18px;

        width: 60px;

        height: 60px;
    }


    #taxpolis-chat-button img {

        width: 39px;

        height: 39px;
    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    #taxpolis-chat-window {

        left: 7px;

        right: 7px;

        top: 70px;

        bottom: 75px;

        max-height:
            calc(100vh - 145px);

        border-radius: 16px;
    }


    .taxpolis-chat-header {

        padding: 11px 12px;
    }


    .taxpolis-chat-body {

        padding: 11px;
    }


    .taxpolis-quick-reply {

        font-size: 10px;

        padding: 7px 10px;
    }


    .taxpolis-chat-title {

        font-size: 13px;
    }


    .taxpolis-chat-status {

        font-size: 9px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    #taxpolis-chat-window,
    #taxpolis-chat-button,
    .taxpolis-chat-action,
    .taxpolis-quick-reply,
    #taxpolis-chat-send {

        animation: none !important;

        transition: none !important;
    }

}

/* TaxPolis chatbot scroll fix: keep scrolling inside the chat window */
#taxpolis-chat-window {
    overscroll-behavior: contain;
}

#taxpolis-chat-body {
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
}

/* Keep the message area scrollable without letting scroll chain to the page */
#taxpolis-chat-body * {
    overscroll-behavior: contain;
}

/* TaxPolis chatbot internal scrolling fix */
#taxpolis-chat-window {
    overscroll-behavior: contain !important;
}

#taxpolis-chat-body {
    height: 400px;
    max-height: 55vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    pointer-events: auto !important;
}

#taxpolis-chat-body .taxpolis-message,
#taxpolis-chat-body .taxpolis-quick-replies,
#taxpolis-chat-body .taxpolis-typing {
    flex-shrink: 0;
}
/* TaxPolis: contain scrolling within the open chatbot */
#taxpolis-chat-window {
    overscroll-behavior: contain !important;
}

#taxpolis-chat-body {
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   FINAL SCROLL FIX - KEEP WEBSITE STILL WHEN SCROLLING CHAT
   ========================================================= */
#taxpolis-chat-window {
    overscroll-behavior: contain !important;
    display: none;
    flex-direction: column;
}

#taxpolis-chat-window.active {
    display: flex !important;
}

#taxpolis-chat-window .taxpolis-chat-body,
#taxpolis-chat-body.taxpolis-chat-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scroll-behavior: auto !important;
}


/* =========================================================
   TAXPOLIS FINAL UI FIX
   - Use TaxPolis logo instead of robot/chat icons
   - Keep launcher out of the input area while chat is open
   - Keep input/footer permanently visible
========================================================= */

/* Floating launcher logo */
#taxpolis-chat-button {
    overflow: hidden !important;
}

#taxpolis-chat-button .taxpolis-launcher-logo {
    width: 42px !important;
    height: 42px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    padding: 2px !important;
}

/* Hide floating launcher while the chat window is open */
#taxpolis-chat-button.chat-button-hidden {
    display: none !important;
}

/* TaxPolis logo inside header and bot avatars */
.taxpolis-chat-logo img,
.taxpolis-bot-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* Give the header logo a clean white logo surface */
.taxpolis-chat-logo {
    background: #ffffff !important;
    border-color: rgba(255,255,255,.35) !important;
    padding: 5px !important;
}

/* Make bot avatar logo clean and consistent */
.taxpolis-bot-avatar {
    background: #ffffff !important;
    border: 1px solid #d9e8f7 !important;
    padding: 4px !important;
}

/* Final desktop/laptop geometry */
#taxpolis-chat-window {
    top: 105px !important;
    bottom: 20px !important;
    height: calc(100vh - 125px) !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
}

#taxpolis-chat-window .taxpolis-chat-header {
    flex: 0 0 auto !important;
}

#taxpolis-chat-window .taxpolis-chat-body {
    flex: 1 1 0% !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#taxpolis-chat-window .taxpolis-chat-input-area {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    position: relative !important;
    z-index: 20 !important;
}

/* Prevent page/launcher overlap with the input */
#taxpolis-chat-window .taxpolis-chat-input-box {
    position: relative !important;
    z-index: 21 !important;
}

/* Tablet */
@media (max-width: 768px) {
    #taxpolis-chat-window {
        top: 75px !important;
        bottom: 10px !important;
        height: calc(100vh - 85px) !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    #taxpolis-chat-window {
        left: 10px !important;
        right: 10px !important;
        top: 65px !important;
        bottom: 10px !important;
        width: auto !important;
        height: calc(100vh - 75px) !important;
        border-radius: 16px !important;
    }

    #taxpolis-chat-button .taxpolis-launcher-logo {
        width: 39px !important;
        height: 39px !important;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    #taxpolis-chat-window {
        left: 7px !important;
        right: 7px !important;
        top: 60px !important;
        bottom: 8px !important;
        height: calc(100vh - 68px) !important;
    }
}











/* =========================================================
   TAXPOLIS AI ASSISTANT - SMALLER ROUND LAUNCHER
========================================================= */

#taxpolis-chat-button {
    width: 65px !important;
    height: 65px !important;

    left: 18px !important;
    bottom: 18px !important;

    padding: 4px !important;

    border: 4px solid #0879df !important;
    border-radius: 50% !important;

    background: #ffffff !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-shadow:
        0 0 0 2px rgba(8, 121, 223, 0.10),
        0 6px 18px rgba(8, 121, 223, 0.25),
        0 0 25px rgba(8, 121, 223, 0.12) !important;

    overflow: visible !important;

    z-index: 1000000 !important;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease !important;
}


/* Chatbot image */

#taxpolis-chat-button .taxpolis-launcher-logo {
    width: 80px !important;
    height: 80px !important;

    object-fit: contain !important;

    display: block !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: transparent !important;

    padding: 0 !important;

    box-shadow: none !important;
}


/* Hover */

#taxpolis-chat-button:hover {
    transform: translateY(-2px) scale(1.03) !important;

    background: #ffffff !important;

    box-shadow:
        0 0 0 3px rgba(8, 121, 223, 0.10),
        0 9px 24px rgba(8, 121, 223, 0.32),
        0 0 30px rgba(8, 121, 223, 0.16) !important;
}


/* Online dot */

#taxpolis-chat-button .taxpolis-chat-pulse {
    display: block !important;

    position: absolute !important;

    right: 0 !important;
    top: 0 !important;

    width: 14px !important;
    height: 14px !important;

    background: #19c56b !important;

    border: 2px solid #ffffff !important;

    border-radius: 50% !important;

    box-sizing: border-box !important;
}


/* Hide launcher when chat is open */

#taxpolis-chat-button.chat-button-hidden {
    display: none !important;
}


/* Mobile */

@media (max-width: 768px) {

    #taxpolis-chat-button {
        width: 68px !important;
        height: 68px !important;

        left: 12px !important;
        bottom: 12px !important;

        border-width: 3px !important;
    }

    #taxpolis-chat-button .taxpolis-launcher-logo {
        width: 57px !important;
        height: 57px !important;
    }

    #taxpolis-chat-button .taxpolis-chat-pulse {
        width: 12px !important;
        height: 12px !important;
    }
}







/* Talk to an expert email button */
.tp-talk-expert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid #dce6f2;
    border-radius: 12px;
    background: #fff;
    color: #183452;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.tp-talk-expert-btn:hover {
    background: #f1f7ff;
    border-color: #1683ff;
    color: #0878e8;
}

.tp-talk-expert-btn i {
    font-size: 15px;
}








/* ==========================================
   TAXPOLIS CHAT — DEFINITIVE LAYOUT FIX
========================================== */

#taxpolis-chat-window {
    position: fixed !important;
    top: 105px !important;
    bottom: 15px !important;
    left: 25px !important;
    right: auto !important;

    width: 390px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    display: none;
    flex-direction: column !important;

    box-sizing: border-box !important;
    overflow: hidden !important;
}

#taxpolis-chat-window.active {
    display: flex !important;
}

/* Header stays fixed at the top */
#taxpolis-chat-window > .taxpolis-chat-header {
    flex: 0 0 auto !important;
}

/* Actual messages container */
#taxpolis-chat-window > #taxpolis-chat-body {
    display: block !important;
    flex: 1 1 0px !important;

    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

/* Footer stays inside the window */
#taxpolis-chat-window > .taxpolis-chat-input-area {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;

    position: relative !important;
    inset: auto !important;

    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    padding: 10px 14px !important;
    margin: 0 !important;
    box-sizing: border-box !important;

    overflow: visible !important;
    background: #fff !important;
}

/* Expert button */
#taxpolis-chat-window .tp-talk-expert-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;

    width: 100% !important;
    min-height: 44px !important;
    margin: 0 0 10px !important;
    box-sizing: border-box !important;
}

/* Input row */
#taxpolis-chat-window .taxpolis-chat-input-box {
    display: flex !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 54px !important;
    box-sizing: border-box !important;
}

#taxpolis-chat-window #taxpolis-chat-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

#taxpolis-chat-window #taxpolis-chat-send {
    flex: 0 0 48px !important;
}

/* Small label below the input */
#taxpolis-chat-window .taxpolis-chat-note {
    flex: 0 0 auto !important;
    margin: 5px 0 0 !important;
    text-align: center !important;
}

/* Mobile */
@media (max-width: 600px) {
    #taxpolis-chat-window {
        top: 80px !important;
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }
}






/* Increase chatbot height without clipping the footer */
#taxpolis-chat-window {
    top: 10px !important;
    bottom: 20px !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: none;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

#taxpolis-chat-window.active {
    display: flex !important;
}

/* Give the conversation more vertical space */
#taxpolis-chat-window #taxpolis-chat-body {
    flex: 1 1 0px !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Keep the expert button and input visible */
#taxpolis-chat-window .taxpolis-chat-input-area {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    position: relative !important;
    bottom: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Mobile screens */
@media (max-width: 600px) {
    #taxpolis-chat-window {
        top: 75px !important;
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }
}



