/* Chat Widget Styles */

#chat-toggle-container {
    position: fixed;
    bottom: 65px;
    right: 20px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 60px;
    height: 60px;
}

#chat-toggle-container:hover #chat-toggle-btn {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

#chat-arc-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    margin-bottom: -5px;
    pointer-events: none;
}

#chat-arc-text text {
    fill: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
}

#chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    padding: 0;
    background: transparent;
}

#chat-toggle-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#chat-close-btn {
    position: fixed;
    bottom: 65px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

#chat-close-btn:hover {
    filter: brightness(0.85);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Hide widget header toggle button */
#chat-widget-container > div:first-child button {
    display: none !important;
}

/* Move chat widget up to avoid overlap with close button */
#chat-widget-container {
    bottom: 135px !important;
    border: none !important;
    display: none !important;
    max-height: calc(100vh - 155px) !important;
    max-height: calc(100dvh - 155px) !important;
}

#chat-widget-container iframe {
    max-height: calc(100vh - 190px) !important;
    max-height: calc(100dvh - 190px) !important;
}

/* Show widget only when open class is added */
#chat-widget-container.chat-open {
    display: block !important;
}

/* Theme color for widget header - set dynamically via CSS variable */
#chat-widget-container > div:first-child {
    background-color: var(--chat-theme-color) !important;
}
