/* Chatbot Button Styling - Fixed at bottom of page */
.eightyk-chatbot-button-wrapper {
    position: fixed !important;
    bottom: 35px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 999 !important;
    pointer-events: none;
    display: block !important;
    visibility: visible !important;
}

.eightyk-chatbot-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    background-color: #2ebdd1;
    color: #fff !important;
    text-decoration: none !important;
    border: 2px solid #2ebdd1;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.15s ease-in-out 0s;
    box-shadow: rgba(99, 99, 99, 0.6) 0px 2px 5px 0px;
    white-space: normal;
    pointer-events: auto;
    cursor: pointer;
}

.eightyk-chatbot-button:hover,
.eightyk-chatbot-button:focus,
.eightyk-chatbot-button:active {
    background-color: #2ebdd1;
    color: #fff !important;
    border-color: #028496;
    border-width: 2px;
    box-shadow: rgba(99, 99, 99, 0.7) 0px 3px 7px 0px;
}

.eightyk-chatbot-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Hide text on small screens - show icon only */
@media (max-width: 480px) {
    .eightyk-chatbot-button span {
        display: none;
    }
    
    .eightyk-chatbot-button {
        padding: 15px;
        gap: 0;
    }
    
    .eightyk-chatbot-icon {
        width: 24px;
        height: 24px;
    }
}

/* Only move button left when TOC button is actually present */
/* Below 768px: TOC button appears, move chatbot button to the left of it */
@media screen and (max-width: 767px) {
    body.sidebar-toc-enabled.feature-flag--2021-08__sidebar-toc-on-sm-and-xs-viewports .eightyk-chatbot-button-wrapper {
        right: 90px !important;
    }
}

/* Between 768px and 992px: TOC button appears, position close to it */
@media screen and (min-width: 768px) and (max-width: 991px) {
    body.sidebar-toc-enabled.feature-flag--2021-08__sidebar-toc-on-sm-and-xs-viewports .eightyk-chatbot-button-wrapper {
        right: 110px !important;
    }
}

/* Desktop (992px+): Position normally on right */
@media screen and (min-width: 992px) {
    .eightyk-chatbot-button-wrapper {
        bottom: 2rem !important;
        right: 2rem !important;
    }
}

/* When audio player is visible, move button up to avoid overlap */
body.t3a-sticky-player-visible .eightyk-chatbot-button-wrapper {
    bottom: 80px !important;
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    body.t3a-sticky-player-visible .eightyk-chatbot-button-wrapper {
        bottom: 88px !important;
    }
}

@media screen and (min-width: 992px) {
    body.t3a-sticky-player-visible .eightyk-chatbot-button-wrapper {
        bottom: calc(2rem + 50px) !important;
    }
}

