/* Global styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* Unique container to prevent conflicts */
.dto-container {
    font-family: 'Roboto', Arial, sans-serif; /* Ensure consistent font loading */
}

/* Styles for the welcome bubble */
.dto-hidden {
    display: none;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Styles for the welcome bubble */
.dto-welcome-bubble {
    position: fixed;
    bottom: 35px;
    right: 120px;
    background-color: rgba(51, 51, 51, 0.511);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    border-left: 4px solid #102dd3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1002;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: calc(100% - 140px);
    word-wrap: break-word;
    min-height: 50px; /* Set a base minimum height */
    height: auto; /* Ensure height adjusts to content */
}

.dto-welcome-bubble.hidden {
    opacity: 0;
    transform: scale(0);
}

.dto-welcome-bubble:hover {
    background-color: rgba(51, 51, 51, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Styles for the floating widget */
.dto-floating-widget {
    position: fixed;
    width: 60%;
    height: 80%;
    bottom: 80px;
    right: 80px;
    background-color: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 200px;
    min-height: 100px;
}

.dto-floating-widget.dto-fullscreen {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
}

/* Styles for the title bar of the floating widget */
.dto-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
    background-color: #000000;
}

.dto-logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.dto-logo-container.dto-left {
    margin-left: 20px;
}

.dto-logo-container.dto-right {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.dto-left-logo {
    height: 80%; 
    object-fit: contain;
}

.dto-right-logo {
    height: 40%; 
    max-height: 30px; 
    object-fit: contain;
    margin-right: auto;
}

/* Styles for the button group in the title bar */
.dto-button-group {
    display: flex;
    align-items: center;
    margin-left: 20px;
    position: relative;
}

.dto-minimize-button, .dto-maximize-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.dto-minimize-button img, .dto-maximize-button img {
    height: 10px;
    width: 10px;
    transition: transform 0.3s ease;
    /* Add this to keep the button in place while growing */
    position: relative;
    z-index: 1;
}

.dto-minimize-button:hover img, .dto-maximize-button:hover img {
    transform: scale(1.5);
}

.dto-button-group button {
    background-color: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    width: 25px;
    height: 25px;
}

.dto-button-group button:hover {
    width: 30px;
    height: 30px; 
}

/* Styles for the iframe container */
.dto-iframe-container {
    width: 100%;
    flex-grow: 1;
}

/* Styles for the toggle button */
.dto-toggle-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 100px !important;
    height: 100px !important;
    border: none !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    cursor: pointer !important;
    z-index: 1001 !important;
    padding: 0 !important;
    overflow: hidden !important;
    transition: transform 0.3s ease !important;
}

.dto-toggle-button:hover {
    transform: scale(1.1) !important;
}

/* Styles for the halo effect */
.dto-halo-container {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.dto-halo {
    position: absolute !important;
    width: 65px !important;
    height: 65px !important;
    background: radial-gradient(circle, rgba(72,9,81,0.1) 0%, rgba(255, 255, 255, 0.3) 70%, rgba(255, 255, 255, 0) 100%) !important;
    border-radius: 50% !important;
    animation: pulse 2s infinite ease-in-out !important;
}

.dto-halo:nth-child(2) {
    width: 80px !important;
    height: 80px !important;
    animation-delay: 1s !important;
}

.dto-halo:nth-child(3) {
    width: 95px !important;
    height: 95px !important;
    animation-delay: 2s !important;
}

/* Styles for the center image of the toggle button */
.dto-center-image {
    position: absolute !important;
    width: 50px !important;
    height: 50px !important;
    background-image: url('https://admin.pryon.net/static/media/idle_sphere_animated-111.ae17472d117e3708f858.apng') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    z-index: 2 !important;
    transition: transform 0.3s ease, background-image 0.3s ease !important;
}

.dto-toggle-button:hover .dto-center-image {
    transform: scale(1.2) !important;
}

.dto-toggle-button.dto-widget-open:hover .dto-center-image {
    transform: scale(1.2) !important;
}

/* Shrinking the toggle button for small screens */
.dto-toggle-button.dto-widget-open {
    display: none !important;
}

@media (max-width: 600px) {
    .dto-toggle-button {
        width: 50px !important;
        height: 50px !important;
        bottom: 10px !important;
        right: 10px !important;
    }

    .dto-floating-widget {
        width: 90% !important;
        height: 80% !important;
    }
}

/* Keyframe animation for the halo effect */
@keyframes pulse {
    0% {
        transform: scale(1) !important;
        opacity: 0.7 !important;
    }
    50% {
        transform: scale(1.1) !important;
        opacity: 1 !important;
    }
    100% {
        transform: scale(1) !important;
        opacity: 0.7 !important;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .dto-floating-widget {
        width: 95% !important;
        height: 90% !important;
        bottom: 10px !important;
        right: 2.5% !important;
        left: 2.5% !important;
    }

    .dto-toggle-button {
        width: 60px !important;
        height: 60px !important;
        bottom: 10px !important;
        right: 10px !important;
    }

    .dto-welcome-bubble {
        bottom: 80px !important;
        right: 10px !important;
        width: 80% !important;
        max-width: 300px !important;
    }

    .dto-title-bar {
        height: 50px !important;
    }

    .dto-left-logo, .dto-right-logo {
        height: 30px !important;
    }
    
    .dto-floating-widget.dto-fullscreen {
        width: 100% !important;
        height: 100% !important;
    }

    .dto-button-group button {
        width: 20px !important;
        height: 20px !important;
    }
}   
/* Specific tweaks for small mobile screens (like iPhone SE) */
@media (max-width: 375px) {
    .dto-floating-widget {
        width: 95% !important;
        height: 75% !important;
        bottom: 10px !important;
        right: 2.5% !important;
        left: 2.5% !important;
    }

    .dto-toggle-button {
        width: 50px !important;
        height: 50px !important;
        bottom: 10px !important;
        right: 10px !important;
    }

    .dto-iframe-container {
        height: 100%;
        overflow-y: auto;
    }

    .dto-title-bar {
        height: 40px !important;
    }

    .dto-left-logo, .dto-right-logo {
        height: 25px !important;
    }

    .dto-button-group button {
        width: 20px !important;
        height: 20px !important;
    }

    /* Adjust chat input area size */
    .dto-iframe-container iframe {
        height: calc(100% - 40px) !important; /* Adjusts for title bar height */
    }
}

/* Minimize the toggle button even further if needed */
@media (max-width: 320px) {
    .dto-toggle-button {
        width: 40px !important;
        height: 40px !important;
        bottom: 5px !important;
        right: 5px !important;
    }
}
/* CSS adjustments for small screens */
@media (max-width: 400px) {
    .dto-floating-widget {
        width: 100% !important;
        height: 80% !important;
        bottom: 10px !important;
        right: 0 !important;
        left: 0 !important;
    }

    .dto-toggle-button {
        width: 40px !important;
        height: 40px !important;
        bottom: 5px !important;
        right: 5px !important;
    }

    .dto-iframe-container {
        height: 100%;
    }

    .dto-title-bar {
        height: 40px !important;
    }

    .dto-left-logo, .dto-right-logo {
        height: 20px !important;
    }

    .dto-button-group button {
        width: 15px !important;
        height: 15px !important;
    }

    /* Input field adjustments for small screens */
    .dto-input-field {
        font-size: 14px;
        padding: 5px;
    }

    .dto-input-field input {
        font-size: 14px;
        padding: 5px;
    }
}

/* Further adjust toggle button when the widget is open */
.dto-toggle-button.dto-widget-open {
    display: none !important;
}