html {
    font-size: 100%;
}

body {
    background-color: #262222;
    color: #ddd;
    font-family: "Arial", sans-serif; 
    max-width: 80rem;
}

a {
    color: #ddd;
    /* text-decoration: none; */
}

.decl {
    background-color: #3f3544;
    border-radius: 0.5rem;
    border-width: 1px;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.model-param-label {
    padding-top: 2rem;
    padding-left: 2rem;
}

.row {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.row * {
    margin: 0 0.5rem;
}

select {
    margin: 0.5rem;
    font-size: 1rem;
    padding: 0.5rem;
    padding-right: 1rem;
    border-radius: 4px;
    border: 1px solid #888888;
    background-color: #333333;
    color: #ffffff;
}

input[type="text"],input[type="password"] {
    margin: 0.5rem;
    font-size: 1rem;
    padding: 0.5rem;
    padding-right: 1rem;
    border-radius: 4px;
    border: 1px solid #888888;
    background-color: #333333;
    color: #ffffff;
}

h1.nav {
    display: flex;
    align-items: center;
    justify-content: space-between; /* This will keep the items spaced apart */
    width: 100%;
}

.nav img {
    height: 3rem;
    width: 7rem;
}

/********
Navigation tabs
*********/
.nav-tabs {
    margin-bottom: 2rem;
    border-bottom: 2px solid #555;
}
.nav-tab {
    font-size: 1.5rem;
    padding: 0.5rem;
    margin: 0rem 0.25rem 0rem 0.25rem;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}
.nav-tab:hover {
    background-color: #555;
}

.nav-tab a {
    text-decoration: none;
}
.nav-tabs div.active {
    background-color: #555555;
}
.nav-tabs .back-button:hover {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    background-color: #555;
}

.back-button {
    text-decoration: none;
    padding-right: 1rem;
}

.back-button::before {
  display: inline-block;
  width: 0.92rem;
  height: 1.8rem;
  vertical-align: -0.125rem;
  padding: 0.5rem 0.5rem 0.5rem 0rem;
  /* edit the fill=%23... to change color */
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1472 1600'%3E%3Cpath fill='%23ccc' d='M1472 736v128q0 53-32.5 90.5T1355 992H651l293 294q38 36 38 90t-38 90l-75 76q-37 37-90 37q-52 0-91-37L37 890Q0 853 0 800q0-52 37-91L688 59q38-38 91-38q52 0 90 38l75 74q38 38 38 91t-38 91L651 608h704q52 0 84.5 37.5T1472 736'/%3E%3C/svg%3E");
}


/********
Toot display
*********/
.author img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.toot {
    background-color: #333333;
    padding: 1rem;
    border-radius: 4px;
}

.toot:not(:last-child) {
    margin-bottom: 1rem;
}

.toot .button-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.toot .button-bar button {
    background-color: transparent;
    margin-left: 0.5rem;
}

.toot .button-bar button:hover {
    background-color: #888888;
    margin-left: 0.5rem;
}

.toot .content img {
    max-width: 100%;
    /* margin-bottom: 10px; */
    border-radius: 0.5rem;
}

.toot .content a {
    /* long links cause horizontal scroll */
    word-wrap: break-word;
}

#toots {
    margin: 2.5rem 0.5rem;
}

/********
Cluster
*********/

.cluster {
    border-width: 2px;
    border-radius: 4px;
    margin: 1rem 0rem;
}

.cluster .title {
    padding: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: #555555;
    cursor: pointer;
    position: sticky;
    top: 0;

    /* HACK: I'd rather only control the height when sticky, but that seems hard */
    max-height: 5em; 
    overflow: scroll; 
}

.cluster[data-open="false"] .title {
    border-radius: 4px;
}

.cluster[data-open="true"] .title {
    border-bottom: 2px solid #888888;
    border-radius: 4px 0px;
}

.cluster[data-open="false"] .content {
    display: none;
}

.cluster .content button {
    display: flex;
    justify-content: flex-end;
}

/********
Button
*********/

button {
    background-color: #666666;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #888888;
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff;
}

/********
Radio
*********/

.radio {
    margin: 0.6rem 0px 0.6rem 0px;
}

.radio div {
    display: inline-block;
    position: relative;
    padding-left: 0px;
    margin: 0px 0px 0px 0px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.radio div input[type="radio"] {
    display: none;
}

.radio div label {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0px -4px 0px -4px;
    background-color: #666666;
    color: #ffffff;
    cursor: pointer;
}

.radio div input[type="radio"]:checked + label {
    background-color: #888888;
}

.radio div:first-child label {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.radio div:last-child label {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/********
Slider
*********/

input[type="range"] {
    width: 100%;
    max-width: 400px;
    margin: 0.5rem 0px 0.5rem 0px;
}

/********
Spinner
*********/

.spinner:not(.htmx-request) {
    display: inline-block;
    vertical-align: middle;
    width: 2rem;
    height: 2rem;
    border-radius: 100%;
    visibility: hidden;
}

.spinner.htmx-request {
    display: inline-block;
    vertical-align: middle;
    width: 2rem;
    height: 2rem;
    border-radius: 100%;
    visibility: visible;
    opacity: 1;
}

/********
Hamburger
*********/

.hamburger-launch {
    background-color: transparent;
}
.hamburger-launch:hover {
    background-color: #444444;
}
.hamburger-launch svg {
    fill: #ffffff;
}

.hamburger {
    display: none;
    cursor: pointer;
}
.hamburger.open {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    right: 0;
    top: 5rem;
    min-width: 8rem;
    position: absolute;
    z-index: 10;
    background-color: #333333;
    padding: 1rem 0rem;
    border-radius: 4px;
}
.hamburger.open a {
    padding: 0.5rem 1rem;
    text-decoration: none;
}
.hamburger.open a:hover {
    background-color: #444444;
}
