/* Container */
.ai-summary-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    text-align: center;
}

/* Button */
#ai-generate-summary {
    display: inline-block;
    padding: 12px 24px;
    background: #ff0066;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    width: -webkit-fill-available;
    margin: 5% 5%;
    box-sizing: content-box;
    display: flex;
    text-align: left;
    border: 1px solid blue;
    background: #f2f2f2;
    color: #000;
    flex-direction: row;
    align-items: center;
    border: 1px solid #e2e2e2;

    font-weight: 550;
}

#ai-generate-summary>svg {
    width: 8vw;
    height: auto;
    padding: 0% 3.5% 0% 0%;
}

#ai-generate-summary:active {
    background: #e6005c;
    background: #dedede;
    transition: background 0.3s;
}

/* Overlay */
#ai-summary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* semi-transparent gray */
    z-index: 9998;
    display: none;
    /* hidden by default */
    pointer-events: all;
    /* make overlay fully interactive */
}

/* Bottom Sheet */
/* Bottom Sheet */
#ai-summary-sheet {
    position: fixed;
    left: 0;
    bottom: -100%;
    /* hidden by default */
    width: 100%;
    max-height: 70%;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    padding: 20px;
    padding: 20px 20px 7px 20px;
    overflow: hidden;
    /* UPDATED: prevent sheet itself from scrolling */
    transition: bottom 0.4s ease;
    z-index: 9999;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
    display: flex;
    /* ADDED: allows content to flex inside sheet */
    flex-direction: column;
    /* ADDED: stack children vertically */

    /* optional mobile styling */
    height: 80vh;
    box-sizing: border-box;

    /* margin: 5% 5%;
    border-radius: 16px;
    box-sizing: border-box;
    width: 90%;
    transform: translateX(-50%);
    left: 45%;
    max-width: 600px; */
}

/* Make only content scrollable */
#ai-summary-box {
    overflow-y: auto;
    flex: 1;
    /* take remaining space in sheet */
    /* padding-right: 10px; optional for scrollbar spacing */
    padding: 5% 0%;
}

#ai-summary-box {
    overflow-y: auto;
    flex: 1;
    padding: 5% 0%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Show the sheet */
#ai-summary-sheet.visible {
    bottom: 0;
}

/* Show overlay */
#ai-summary-overlay.visible {
    display: block;
}

/* Close button */
#ai-summary-sheet .ai-close-sheet {
    display: inline-block;
    background: #ff0066;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 12px;

    /* My update */
    display: inline-block;
    /* background: #ff0066; */
    /* color: #fff; */
    border: none;
    /* padding: 6px 12px; */
    border-radius: 6px;
    cursor: pointer;
    /* margin-bottom: 12px; */
    background: unset;

    display: flex;
    flex-direction: row;
}

.ai-close-sheet > svg {
    height: 6vw;
    width: auto;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Typing effect cursor */
.typing-cursor {
    display: inline-block;
    width: 2px;
    background: #ff0066;
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: bottom;
}

@keyframes blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0;
    }
}

.powered {
    display: flex;
    flex-direction: row;
    bottom: 0;
    /* position: absolute; */
    width: -webkit-fill-available;
    align-items: center;
    /* margin: 5% 2%; */
    /* margin: 5% 2% 7% 2%; */
    font-size: 2.2vw;
    padding-top: 1%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.powered > svg {
    height: 3vw;
    width: auto;
    padding: 0% 0% 0% 1%;
}

/* Animations */
#rotating {
    /* Animation will be applied dynamically */
    transform-box: fill-box;
    /* ensures transform uses path coordinates */
    transform-origin: center center;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

#rotating {
    transform-origin: 38.423px 43.248;
    /* center of purple shape */
    animation: pulse 1s ease-in-out 1 forwards;
    /* one-time pulse */
}

.evont-ai-credit {
    /* position: absolute; */
    /* bottom: 9%; */
    font-size: 3.2vw;
    margin-top: 5vw;
}