:host {
    /* this is used for styling ibgib components for multi-view coordination, so
     * that ibgib views that are looking at the same ibgib can be visibly shown
     * as doing so. */
    --ibgib-color: #ff00dd;
    --ibgib-color-translucent: #ff00dd10;
    --tjp-color: #00ffae;
    --tjp-color-translucent: #00ffae10;
    overflow: auto;
}

/* Basic layout and styling for the minigame component */
#minigame-component {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* width: 100%; */
    height: 100%;
    box-sizing: border-box;
    /* Use consistent padding */
    padding: 1%;

    /* ibgib styling */
    border: var(--tjp-color) 5px solid;
    box-shadow: 0 0 10px var(--tjp-color);
    border-radius: 5px;

    /* Optional: If using flexbox to control vertical alignment */
    /* justify-content: center;  Align content vertically */


    #minigame-header {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
        height: 4%;

        #metronome-controls {
            height: 100%;
            display: flex;
            flex-direction: row;
            align-items: stretch;
            justify-content: flex-start;

            #metronome-play-pause-btn {
                display: flex;
                flex-direction: row;
                justify-content: flex-start;
                align-items: center;
                text-wrap-mode: nowrap;
            }
        }

        /* #minigame-header-tabs {
            overflow-x: auto;
            width: 90%;
            scrollbar-width: thin;
            scrollbar-gutter: stable;
            margin-bottom: -1%;
            font-size: small;
        } */

        button {
            width: auto;
            height: 100%;
            aspect-ratio: 1/1 !important;

            color: var(--tjp-color-contrast);
            border-color: var(--tjp-color-contrast);
            background-color: var(--tjp-color);

            /* hack to raise the text upwards */
            position: relative;

            span {
                position: relative;
                bottom: 3px;
            }
        }

        button:hover {
            border-width: 2px;
            background-color: var(--button-hover-background-color);
            color: var(--button-hover-text-color);
            border-color: var(--button-hover-border-color);
        }

        button:disabled {
            color: #958f8f !important;
            border-color: #958f8f !important;
            background-color: rgba(128, 128, 128, 0.316) !important;
            cursor: default !important;
        }

        /* no change for hover state on disabled buttons, this should match above
         * disabled style */
        button:disabled:hover {
            color: #958f8f !important;
            border-color: #958f8f !important;
            background-color: rgba(128, 128, 128, 0.316) !important;
            cursor: default !important;
        }

        /* Add back the relative container for the button and popover */
        .add-button-container,
        .ellipsis-button-container {
            background-color: transparent;
            /* position: relative;
            display: inline-block; */
        }

        /* Keep the styles for the popover options */
        .add-popover-option,
        .ellipsis-popover-option {
            padding: 8px 15px;
            margin-bottom: 2px;
            cursor: pointer;
            transition: background-color 0.2s ease;
            background-color: var(--tab-background-color);
            color: var(--tab-text-color);
        }

        /* Keep the styles for the popover options */
        .add-popover-option:hover,
        .ellipsis-popover-option:hover {
            /* color: var(--tjp-color-contrast, #f0f0f0); */
            color: contrast-color(var(--tjp-color, #f0f0f0));
            background-color: var(--tjp-color, #f0f0f0);
        }

        /* Use anchor() for positioning */
        .add-popover,
        .ellipsis-popover {
            /* bottom: anchor(top); */
            /* Position the bottom of the popover at the top of the anchor */
            /* left: anchor(left); */
            /* Align the left of the popover with the left of the anchor */
            flex-direction: column;
            margin: 0px;
            /* padding: 5px 0; */
            border-radius: var(--border-radius, 4px);
            background-color: var(--background-color, #fff);
            border: 1px solid var(--border-color, #ccc);
            box-shadow: var(--box-shadow, 0 2px 5px rgba(0, 0, 0, 0.2));
            z-index: 10;
            /* Ensure it appears above other content */
        }

        /* #minigame-name {
            font-weight: bold;
        }

        #minigame-description {
            white-space: pre-wrap;
            font-style: italic;
        }

        #minigame-description.collapsed {
            display: none;
        } */
    }

    #minigame-content {
        display: flex;
        flex-direction: column;
        height: 91%;
        /* flex-grow: 1; */
        overflow: auto;

        /* :only-child {
            height: 100%;
            width: 100%;
            box-sizing: border-box;
        } */

        #minigame-pause-screen {
            height: 100%;
            width: 100%;
            z-index: 999999;
        }

        #minigame-component-div {
            height: 100%;
            width: 100%;
            box-sizing: border-box;
            /* overflow: auto; */
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
    }

    #minigame-footer {
        height: 5%;

    }

}

/* ibgib-raw,
ibgib-text-editor {
} */
