/* Widget container - holds iframe and powered-by together */
#widgetContainer {
    position: fixed;
    bottom: 4%;
    right: 2%;
    z-index: 9999;
    display: none;
    flex-direction: column;
    width: 25%;
    height: 50%;
    min-width: 280px;
    min-height: 300px;
    max-width: 90vw;
    max-height: 90vh;
}

/* Resize handles */
#widgetResizeHandle,
#widgetResizeTop,
#widgetResizeLeft {
    position: absolute;
    z-index: 10000;
}

/* top-left corner */
#widgetResizeHandle {
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    cursor: nw-resize;
}

/* top edge */
#widgetResizeTop {
    top: 0;
    left: 18px;
    right: 0;
    height: 6px;
    cursor: n-resize;
}

/* left edge */
#widgetResizeLeft {
    left: 0;
    top: 18px;
    bottom: 0;
    width: 6px;
    cursor: w-resize;
}

#iframeBox {
    flex: 1;
    display: flex;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    border: none;
    width: 100%;
    background-color: black;
    box-shadow: 0px 0px 12px 0px rgb(250, 250, 250, 0.4);
}

#heading {
    color: white;
    position: absolute;
    top: 20%;
    z-index: 10;
}

#avatarImage {
    position: fixed;
    z-index: 1000;
    right: 2.5%;
    bottom: 5%;
    border-radius: 100%;
    cursor: pointer;
    transition: 0.5s;
    width: 6rem;
    height: 6rem;
    box-shadow: 0 0 15px 6px rgba(255, 255, 255, 0.05),
                0 0 25px 10px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.25)) blur(0.3px);
}

#avatarImage:hover {
    box-shadow: 0 0 50px 1px rgb(169, 169, 169);
}

@keyframes spinning82341 {
    to {
        transform: rotate(360deg);
    }
}

#spinner {
    background-image: linear-gradient(rgb(186, 66, 255) 35%, rgb(186, 194, 195));
    animation: spinning82341 3.5s linear infinite;
    text-align: center;
    border-radius: 100%;
    filter: blur(1px);
    box-shadow: 0px -5px 20px 0px rgb(186, 66, 255), 0px 5px 20px 0px rgb(241, 235, 229);
    position: fixed;
    z-index: 100;
    right: 2.5%;
    bottom: 5%;
}

#spinner1 {
    background-color: rgb(36, 36, 36);
    width: 6rem;
    height: 6rem;
    border-radius: 100%;
    filter: blur(10px);
}

@media (max-width: 480px) {
    #widgetContainer {
        width: 80%;
        height: 40%;
    }
    #avatarImage {
        height: 5rem;
        width: 5rem;
    }
    #spinner1 {
        height: 5rem;
        width: 5rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #widgetContainer {
        width: 50%;
        height: 40%;
    }
}

@media (min-width: 769px) {
    #widgetContainer {
        width: 25%;
        height: 50%;
    }
}

#poweredByDigihumans {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: white;
    padding: 0.25rem 0;
    font-family: Arial, sans-serif;
    background-color: black;
    border-radius: 0 0 20px 20px;
}

#poweredByLink {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: bold;
}

#poweredByLink:hover {
    color: #bb00bb;
}

@media (max-width: 480px) {
    #widgetContainer {
        width: 80%;
        height: 40%;
    }
    #widgetContainer.expanded {
        height: 90%;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #widgetContainer {
        width: 50%;
        height: 40%;
    }
    #widgetContainer.expanded {
        height: 90%;
    }
}

@media (min-width: 769px) {
    #widgetContainer.expanded {
        height: 90%;
    }
}
