/* Styles of the htmx version of the site */
.icon-button {
    background: none;
    border: 0;
    padding: 0 2px;
    color: inherit;
    cursor: pointer;
}
.icon-button:hover { color: rgba(0, 229, 255, .8); }
#modal .htmx-indicator { width: 1.5rem; height: 1.5rem; }

/* --- loading animations (static/js/site-1.js) --- */
@keyframes pnlhub-spin { to { transform: rotate(360deg); } }
@keyframes pnlhub-appear { from { opacity: 0; } to { opacity: 1; } }

.pnlhub-progress { height: 3px !important; }

/* the button that started an htmx request */
.is-busy { position: relative; pointer-events: none; color: transparent !important; }
.is-busy > * { visibility: hidden; }
.is-busy::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 1rem; height: 1rem; margin: -.5rem 0 0 -.5rem;
    border: 2px solid #adbac7; border-right-color: transparent; border-radius: 50%;
    animation: pnlhub-spin .75s linear infinite;
}

/* an element that is being replaced by htmx */
.is-loading { position: relative; min-height: 3rem; }
.is-loading > * { opacity: .35; transition: opacity .2s; }
.is-loading::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 2rem; height: 2rem; margin: -1rem 0 0 -1rem;
    border: 3px solid rgba(0, 229, 255, .8); border-right-color: transparent; border-radius: 50%;
    animation: pnlhub-spin .75s linear infinite; z-index: 5;
}

/* navigation to another page: shown only if the server takes longer than .4s */
body.page-leaving main { opacity: .35; transition: opacity .3s .4s; }
body.page-leaving::after {
    content: ''; position: fixed; top: 50%; left: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem;
    border: 4px solid rgba(0, 229, 255, .8); border-right-color: transparent; border-radius: 50%; z-index: 2000;
    opacity: 0; animation: pnlhub-spin .75s linear infinite, pnlhub-appear .2s .4s forwards;
}
