/* RESETS */
* {
    box-sizing: border-box;
}

body {
    margin: 0px;
    font-family: var(--font-sans);
}

/* HEADERS & FOOTERS  */

header {
    width: 100%;
    border-top: 3px solid var(--yellow-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: white;
    border-bottom: 1px solid var(--gray-4);
}

header .header__content {
    margin: var(--size-3) 0px;
    padding: var(--size-1) var(--size-4);
}

header .header__top {
    width: 100%;
}

header .header__top .flashes {
    background: var(--yellow-6);
}

header .header__top .flashes .flashes__flash {
    padding: var(--size-2) var(--size-4);
}

header .header__top .flashes .flashes__flash p {
    padding: 0px;
    margin: 0px;
    color: white;
}

header .header__main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

header .header__main img {
    max-width: 61px;
    width: 100%;
    height: auto;
}

footer {
    margin-top: var(--size-4);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: var(--gray-9);

}

footer .footer__content {
    width: 100%;
    color: var(--gray-0);
    margin: var(--size-3) 0px;
    padding: var(--size-1) var(--size-4);
}

/* GENERAL UTILITY STUFF */

.site-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: var(--gray-1);
}

.main__content {
    min-height: 80vh;
}

.container {
    width: 100%;
    max-width: 1100px;
}

.all-sizes-pad {
    padding: var(--size-1) var(--size-4);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: var(--size-4);
}

.grid__card {
    background: white;
    border-radius: var(--radius-2);
    padding: var(--size-4);
}

.flex__split {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* DEFAULT BODY TEXT */
p, em, b {
    color: var(--gray-7);
}

/* FORMS */

fieldset {
    display: grid;
    grid-template-columns: 3fr 4fr;
    gap: var(--size-4);
    border: 0px;
    margin: var(--size-5) 0px;
    padding: 0px;
}

fieldset legend {
    font-weight: bold;
    font-size: var(--font-size-3);
}

fieldset .fieldset-desc h3 {
    margin: var(--size-2) 0px;
}

fieldset .fieldset-desc p {
    margin: var(--size-1) 0px var(--size-2);
}

fieldset .fieldset-content {
    padding: var(--size-4);
    background: white;
    border-radius: var(--radius-2);
}

fieldset .fieldset-content.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--size-4);
}

.span-2 {
    grid-column: span 2;
}

.form-control {
    display: flex;
    flex-direction: column;
}

.form-control small {
    margin-bottom: var(--size-2);
    color: var(--gray-7);
}

.form-control.checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--size-2);
    margin: var(--size-2) 0;
}

.input-group__wrapper {
    background: white;
    border-radius: var(--radius-2);
}

.input-group {
    padding: var(--size-4);
    border-top: 1px solid var(--gray-4);
}

.input-group:first-of-type {
    border: none;
}

.input-group h4 {
    margin: 0px;
}


details summary {
    width: 100%;
    padding: var(--size-2) 0;
    position: relative;
    list-style: none;
    cursor: pointer;
}

details summary:after {
    content: "";
    transform: rotate(0deg);
    position: absolute;
    right: 0;
    top: calc(50% - 0.75em);
    width: 1.25em;
    height: 1.25em;
    transition: all 0.2s var(--ease-4);
    opacity: 0.5;
    background-image: url(/static/assets/chevron-small.svg);

}

details summary:hover:after,
details summary:focus:after {
    opacity: 1;
}

details[open] summary:after {
    content: "";
    transform: rotate(180deg);
    position: absolute;
    right: 0;
    top: calc(50% - 0.75em);
    width: 1.25em;
    height: 1.25em;
}

details summary::marker,
details summary::-webkit-details-marker {
    display: none;
}


details.checkbox-details summary {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

details.checkbox-details summary label {
    padding: var(--size-2) 0 var(--size-2) calc(var(--size-4) + 12px);
    width: 100%;
    cursor: pointer;
}

details.checkbox-details summary input[type="checkbox"] {
    position: absolute;
    top: calc(50% - 10px);
    padding: 0 var(--size-3) 0 0;
}

details.checkbox-details summary:after {
    pointer-events: none;
}


/* INPUTS */
.form-control :is(input, select, textarea):not(input[type="file"],input[type="checkbox"],input[type="radio"]) {
    width: 100%;
    background: white;
    padding: var(--size-1) var(--size-2);
    border: 1px solid var(--gray-4);
    margin: var(--size-2) 0px;
    border-radius: var(--radius-2);
    font-family: var(--font-sans);
    font-size: var(--font-size-1);
    outline-color: var(--yellow-5);
    outline-width: 2px;
    outline-offset: var(--size-1);
}

.form-control :is(input, select, textarea):not(input[type="file"]).invalid {
    padding: var(--size-1) var(--size-2);
    border: 1px solid var(--red-4);
    margin: var(--size-2) 0px;
    border-radius: var(--radius-2);
    font-family: var(--font-sans);
    font-size: var(--font-size-1);
    outline-color: var(--red-5);
    background: var(--red-1);
    outline-width: 2px;
    outline-offset: var(--size-1);
}

.form-content.cols-one > * {
    margin-bottom: var(--size-2);
}

.form-control small.error-msg {
    color: var(--red-8);
    text-decoration-color: var(--red-8);
    padding: var(--size-1) var(--size-1);
    border-radius: var(--radius-2);
    display: none;
}

/* this forces a download via fetch... */
button#force {
    display: inline;
    padding: 0px;
    margin: 0px;
    color: blue;
    text-decoration: underline;
    background: none;
    border: 0px;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid var(--gray-4);
}

table th {
    text-align: left;
    text-transform: uppercase;
    color: var(--gray-7);
    font-weight: var(--font-weight-5);
    font-size: var(--font-size-0);
}

table th div.sortable {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

table th div.sortable a {
    display: grid;
    place-items: center;
    color: var(--gray-7);
    /*background: var(--gray-2);*/
    border-radius: var(--radius-2);
    padding: var(--size-1);
    text-decoration: none;
    /*border: 1px solid var(--gray-4);*/
}

table th div.sortable a:hover {
    background: var(--gray-3);
}

table th div.sortable:hover img {
    opacity: 1;
}

table th div.sortable a img {
    opacity: 0;
    width: 16px;
    height: 16px;
}

table th div.sortable a img.flipped {
    opacity: 1;
    transform: rotate(180deg);
}



table tr:first-of-type, table tr:last-of-type {
    background: var(--gray-1);
    border: none;
}

table tr {
    border-top: 1px solid var(--gray-4);
    border-bottom: 1px solid var(--gray-4);
    background: white;
}

table td, table th {
    padding: var(--size-2) var(--size-3);
}


/* STATUS BARS / FLASHES */
span.upload_status {
    display: block;
}

span.upload_status.loading {
    margin: var(--size-4) 0px 0px 0px;
    padding: var(--size-2);
    background: var(--gray-1);
    color: var(--gray-6);
    border-radius: var(--radius-2);
    border: 1px solid var(--gray-4);
}

span.upload_status.success {
    margin: var(--size-4) 0px 0px 0px;
    padding: var(--size-2);
    background: var(--green-1);
    color: var(--green-6);
    border-radius: var(--radius-2);
    border: 1px solid var(--green-4);
}

span.upload_status.error {
    margin: var(--size-4) 0px 0px 0px;
    padding: var(--size-2);
    background: var(--red-1);
    color: var(--red-6);
    border-radius: var(--radius-2);
    border: 1px solid var(--red-4);
}

/* BUTTONS */
button, a.button {
    padding: var(--size-2) var(--size-3);
    font-size: var(--font-size-1);
    font-family: var(--font-sans);
    background-image: var(--gradient-8);
    color: var(--gray-0);
    border-radius: var(--radius-2);
    border: none;
    cursor: pointer;
    outline-color: var(--yellow-5);
    outline-width: 2px;
    outline-offset: var(--size-1);
    text-decoration: none;
}

button:hover, a.button:hover {
    color: var(--yellow-5);
}

button:focus, a.button:hover {
    color: var(--yellow-5);
    box-shadow: 0 4px 6px -1px rgb(255 212 59/0.1), 0 2px 4px -2px rgb(255 212 59/0.1);
}

button.form-submit {
    font-size: var(--font-size-2);
    padding: var(--size-4) var(--size-5);
    width: 100%;
}

button:disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* BADGES */
.badge {
    padding: var(--size-1) var(--size-3);
    background: var(--gray-4);
    color: var(--gray-8);
    border-radius: 32px;
}

.badge-active {
    background: var(--green-3);
    color: var(--green-9);
}

.badge-inactive {
    background: var(--gray-3);
    color: var(--gray-9);
}


/* LOGIN / SIGNUP FORMS */
.login_or_signup {
    display: flex;
    flex-direction: column;
    gap: var(--size-2);
    max-width: 550px;
    width: 100%;
    background: white;
    border-radius: var(--radius-2);
    padding: var(--size-4);
    margin: var(--size-6) 0px;
}

.login_or_signup :is(h1, p) {
    margin: var(--size-2) 0px;
}

/* ACCESSIBILITY */
.hide-element {
    border: 0;
    clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* RESPONSIVE */
@media screen and (max-width: 1100px) {
    fieldset {
        grid-template-columns: 1fr;
        gap: var(--size-2);
        margin: 0px var(--size-4);
    }
}

@media screen and (max-width: 726px) {
    fieldset {
        margin: 0px;
    }

    fieldset .fieldset-desc {
        margin-top: var(--size-5);
    }

    fieldset .fieldset-content {
        border-radius: 0px;
    }

    fieldset .fieldset-content.two-cols {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-gap: var(--size-4);
    }

    .flex__split {
        flex-direction: column;
    }

    header .header__main img {
        max-width: 32px;
        width: 100%;
        height: auto;
    }
}

/* toast styles */
.toast-wrapper {
    position: fixed;
    left: 0px;
    bottom: 0px;
    padding: var(--size-3);
    overflow: hidden;
}

.toast {
    position: relative;
    background: white;
    pointer-events: none;
    padding: var(--size-3);
    border-radius: 6px;
    box-shadow: var(--shadow-2);
}

.toast p {
    margin: 0px;
    padding: 0px;
}

.toast.hidden {
    display: none;
}

.toast.toast--enter {
    animation: var(--animation-fade-in) forwards,
    var(--animation-slide-in-up);
    animation-timing-function: var(--ease-squish-3);
    animation-duration: 0.6s;
}

.toast.toast--exit {
    animation: var(--animation-fade-out) forwards,
    var(--animation-slide-out-down);
    animation-timing-function: var(--ease-squish-3);
    animation-duration: 0.6s;
}

/* pell goodies */
.pell {
    margin-top: var(--size-2);
}

.pell-actionbar {
    width: 100%;
    top: var(--size-1);
}

button.pell-button {
    padding: 0;
    background: white;
    color: var(--gray-9);
}

/* pell: hide buttons I don't want */
button.pell-button[title="Strike-through"],
button.pell-button[title="Strike-through"],
button.pell-button[title="Quote"],
button.pell-button[title="Code"],
button.pell-button[title="Image"]
{
    display: none;
}