﻿#chatbot-container {
    display: none;
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 400px;
    height: 550px;
    border: 1px solid #ccc;
    z-index: 999;
    background-color: #fff;
}

.chat-interceptor {
    position: fixed;
    right: 27px;
    bottom: 25px;
    width: 105px;
    height: 80px;
    cursor: pointer;
    z-index: 999999;
    /* Mobile optimizations */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
    display: none;
}

.chat-icon {
    width: 150px;
    height: 57px;
    background-image: url(/assets/images/chatbot.svg);
    background-repeat: no-repeat;
}

.chatbot_iframe {
    position: fixed;
    right: 25px;
    bottom: 68px;
    width: 0px;
    height: 0px;
    border: none;
    border-radius: 50%;
    z-index: 3147483646;
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 1;
}

    .chatbot_iframe.expanded {
        width: 420px;
        height: 75vh;
        border-radius: 10px;
        pointer-events: auto;
        bottom: 90px;
        right: 7px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
        background-color: rgb(255, 255, 255);
    }
/* Samsung S20 Ultra and similar sized devices */
@media screen and (min-width: 412px) and (max-width: 992px) {
    .chatbot_iframe.expanded {
        width: calc(100% - 28px);
        left: 14px;
        right: 14px;
        max-height: 420px;
    }
}

/* iPhone specific adjustments */
@media screen and (min-width: 390px) and (max-width: 428px) {
    .chatbot_iframe.expanded {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
    }
}

/* Additional adjustments for very large phones */
@media screen and (min-width: 390px) and (max-width: 992px) {
    .chatbot_iframe.expanded {
        width: calc(100% - 32px);
        / Slightly more padding for larger screens / left: 16px;
        right: 16px;
    }
}
/* Specific mobile device handling */
@media screen and (max-width: 992px) {
    .chatbot_iframe.expanded {
        width: calc(100% - 28px); /* Account for padding on both sides */
        max-width: 500px; /* Maximum width for larger phones */
        height: 75vh;
        border-radius: 10px;
        pointer-events: auto;
        bottom: 90px;
        left: 14px; /* Equal spacing on both sides */
        right: 14px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
        margin: 0 auto;
        max-height: 600px;
    }
}

/* Tablet and medium-sized phones */
@media screen and (max-width: 992px) {
    .chat-icon {
        height: 50px;
        width: 135px;
    }

    .chatbot_iframe {
        bottom: 35px;
    }

    .chat-interceptor {
        width: 100px;
        height: 58px;
        right: 30px;
        bottom: 30px;
        transform: translateZ(0);
    }
}
/* Larger screens */
@media screen and (min-width: 993px) {
    .chatbot_iframe.expanded {
        width: 420px;
        height: 70vh;
        border-radius: 10px;
        bottom: 90px;
        right: 20px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
        max-height: 480px;
    }
}

@media screen and (min-width: 1200px) {
    .chatbot_iframe.expanded {
        max-height: 600px;
    }
}
/* Ensure proper spacing on all devices */
@supports (-webkit-touch-callout: none) {
    /* iOS specific adjustments */
    .chatbot_iframe.expanded {
        bottom: calc(90px + env(safe-area-inset-bottom));
    }
}
