:root {
    --night: #243242;
    --sky: #ACC3DD;
    --gold: #EACE5D;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.1);
    }

    /* 90% {
        transform: scale(0.95);
    } */
    100% {
        transform: scale(1);
    }
}

@keyframes bounceOut {
    0% {
        transform: scale(1);
    }

    /* 90% {
        transform: scale(0.95);
    } */
    100% {
        transform: scale(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%) translateY(-50%);
    }

    to {
        transform: translateX(0) translateY(-50%);
    }
}

/* Animation for sliding out */
@keyframes slideOut {
    from {
        transform: translateX(0) translateY(-50%);
    }

    to {
        transform: translateX(120%) translateY(-50%);
    }
}

@keyframes slideOutVertically {
    from {
        transform: translateX(50%) translateY(-50%) rotate(-90deg);
    }

    to {
        transform: translateX(120%) translateY(-50%) rotate(-90deg);
    }
}


.explain-ai-sidepanel {
    position: fixed;
    right: 20px;
    max-height: 95%;
    height: 800px;
    width: 400px;
    top: 50%;
    transform: translateY(-50%) translateX(100%);
}

.explain-ai-sidepanel.show {
    animation: slideIn 0.5s forwards;
}

.explain-ai-sidepanel.hide {
    animation: slideOut 0.5s forwards;
}

.explain-ai-popup {
    position: absolute;
    width: 500px;
    height: 400px;
    animation: bounceIn 0.5s forwards;
    transform-origin: top left;
}

#explain-ai-wrapper {
    z-index: 1000000;
    border: 0px;
    display: none;
    flex-direction: column;
    overflow: auto;
    /* resize: both; */
    /* border-radius: 0px 0px 0px 15px; */
    border-radius: 25px;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

#explain-ai-title-bar {
    width: 100%;
    height: 28px;
    padding: 5px;
    box-sizing: border-box;
    background-color: var(--night);
    color: var(--sky);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    transition: height 0.5s ease;
}

#explain-ai-title-bar:hover {
    height: 35px;
}

#explain-ai-iframe {
    border: 0px;
    display: block;
    flex-grow: 1;
    /* height: calc(100% - 28px); */
    width: 100%;
    /* position: absolute; */
}

#close-button {
    display: flex;
    align-items: center;
    height: 60%;
    stroke: var(--sky);
}

#close-button:hover {
    stroke: var(--gold);
}

#settings-button {
    display: flex;
    align-items: center;
    height: 80%;
    fill: var(--sky);
    stroke: var(--sky);
}

#settings-button:hover {
    fill: var(--gold);
    stroke: var(--gold);
}

#xpln-sticker {
    display: flex;
    position: fixed;
    font-family: Inter;
    font-size: 10px;
    right: calc(10px + env(safe-area-inset-right)); /* Align to the right edge of the viewport */
    top: 50%; /* Center vertically */
    transform: translateY(-50%) translateX(50%) rotate(-90deg); /* Adjust for vertical centering and rotation */
    background-color: var(--night);
    color: var(--night);
    padding: 5px 15px;
    border-radius: 0px;
    cursor: pointer;
    z-index: 1000;
    font: 10px;
}

#xpln-sticker.hide {
    animation: slideOutVertically 0.5s forwards;
}

.xpln-sticker-part1 {
    margin-right: 5px;
    font-weight: 300;
    color: white;
}

.xpln-sticker-part2 {
    font-weight: 400;
    color: var(--gold);
}