html {
    position: relative;
    min-height: 100%;
}
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    line-height: 30px;
    font-size: 0.8em;
}

main {
    margin-bottom: 70px;
}
.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

.icon-lg {
    width: 3em;
    height: 3em;
    vertical-align: -0.125em;
}

.icon-md {
    width: 2em;
    height: 2em;
    vertical-align: -0.125em;
}

.pointer {
    cursor: pointer;
}

.sortable {
    cursor: move;
}

.help {
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
}

input[type="text"]:read-only {
    background-color: #e9ecef;
}

.glowing {
    box-shadow: 0 0 10px orange;
    padding: 3px 0px 3px 3px;
    margin: 5px 1px 3px 0px;
    border: 1px solid orange;
}

.new-item {
    animation-duration: 0.8s;
    animation-name: animate-fade;
    animation-fill-mode: backwards;
}

.updated-item {
    animation-duration: 2.5s;
    animation-name: animate-fade;
    animation-direction: reverse;
    animation-fill-mode: forwards;
}

@keyframes animate-fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.spinner {
    transform-origin: center;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

[x-cloak] {
    display: none !important;
}

@media (max-width: 991.98px) {
    .breadcrumb-item {
        display: block;
        width: 100%;
    }
    .player-controls .btn {
        font-size: 0.8em;
    }
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 500ms ease-in;
}
.htmx-request .htmx-indicator {
    opacity: 1;
}
.htmx-request.htmx-indicator {
    opacity: 1;
}

/*Chat Stuff*/

#chat-button {
    z-index: 1500;
    margin-bottom: 20px;
    font-size: 2.8em;
    cursor: pointer;
}

#chat-button img {
    width: 160px;
    height: 160px;
}

#chat-window {
    width: 33vw;
    height: 33vh;
    margin: 20px;
    min-height: 500px;
    min-width: 250px;
    margin-bottom: 80px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
}

@media (max-width: 767.98px) {
    #chat-window {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh; /* Dynamic viewport height - adjusts for on-screen keyboard */
        margin: 0;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }

    /* Additional support for browsers that don't support dvh */
    @supports not (height: 100dvh) {
        #chat-window {
            height: calc(100vh - env(keyboard-inset-height, 0px));
        }
    }

    #chat-button img {
        width: 90px;
        height: 90px;
    }
}

.chat-header {
    flex-shrink: 0;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#chat-input-area {
    flex-shrink: 0;
}

#chat-input-area input {
    flex: 1;
}
