/* RESET */
:root {
    --font-family-base: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --line-height: 1.6;
    --heading-line-height: 1.1;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    interpolate-size: allow-keywords;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

body {
    min-height: 100vh;
    line-height: var(--line-height);
    margin: 0;
}

h1,
h2,
h3,
h4,
button,
input,
label,
input::file-selector-button {
    line-height: var(--heading-line-height);
}

a:not([class]) {
    color: currentColor;
}

img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    display: block;
}

input,
button,
textarea,
select,
input::file-selector-button {
    font: inherit;
}

textarea:not([rows]) {
    min-height: 10em
}

button:not(:disabled),
input::file-selector-button {
    cursor: pointer
}

table,
time {
    font-variant-numeric: tabular-nums;
}

p,
li,
figcaption {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ol,
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* END RESET ------------ */

:root {
    /* COLORS */

    /* UGA Theme */
    /* Primary */
    --clr-black: black;
    --clr-white: white;
    --clr-bulldog-red: #ba0c2f;
    /* Secondary */
    /* Vibrant */
    --clr-glory: #e4002b;
    --clr-herrick: #00a3ad;
    /* Rich */
    --clr-hedges: #b4bd00;
    --clr-olympic: #004e60;
    /* Dark */
    --clr-sanford: #554f47;
    --clr-herty: #594a25;
    --clr-athens: #66435a;
    /* Neutral */
    --clr-stegeman: #9ea2a2;
    --clr-creamery: #d6d2c4;
    --clr-odyssey: #c8d8eb;

    /* LLB Theme */
    --clr-worn-white: #f9f9f9;


    /* UI */
    --clr-accent: hsl(348, 88%, 54%);
    --clr-accent-dark: hsl(348, 68%, 54%);
    --clr-bg: var(--clr-worn-white); 
    --clr-bg-light: white;
    --clr-border: black;
    --clr-brand: #ba0c2f;
    --clr-card-bg: white;
    --clr-disabled: var(--clr-stegeman);
    --clr-text: black;
    --clr-text-light: white;

    /* END COLORS */

    --font-size: 1.125rem;
    --amt-line-height: calc(var(--font-size) * var(--line-height));
    --width-text-input: 15rem;
    --narrow-text-input: 10rem;
}

html {
        scroll-padding: 4rem;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size);
    background-color: var(--clr-bg);
}

main {
    padding: 1rem 0;
}

h1 {
    font-size: 1.4em;
}

h2 {
    font-size: 1.2em;
}

h3,
h4,
h5,
h6 {
    font-size: 1em;
}

nav.primary,
nav.project {
    & a {
        text-decoration: none;
    }

    display: flex;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    align-items: center;

    ul {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem 2rem;
        align-items: center;
    }

    ul.right {
        flex-grow: 1;
        justify-content: flex-end;
    }
}

nav.primary {
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, black, var(--clr-brand));
    color: var(--clr-bg);
    border-bottom: solid 1px black;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

td,
th {
    padding: 1px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

tbody tr:nth-child(even) {
    background-color: #FAFAFA
}

tbody tr:nth-child(odd) {
    background-color: white
}

table thead {
    background-color: var(--clr-bg)
}

/* Forms */
form {
    display: grid;
    gap: 1rem;

    & section {
        display: grid;
        gap: 1rem;

        & h2 {
            margin: 0;
        }
    }
}

.form-group {
    display: grid;
    gap: 0.5rex;
}

.form-group:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 1ch;
}

label {
    font-size: 1rem;
}

input {
    background: var(--clr-bg-light);
    color: var(--clr-text);
    border: var(--clr-border);
    accent-color: var(--clr-accent);
    padding: 1rex 2rex;
}

input:not([type="checkbox"], [type="radio"]) {
    width: 100%;
}

form button {
    justify-self: start;
}


:focus-visible {
    outline: 2px dashed var(--clr-accent);
}

input:focus-visible,
button:focus-visible,
.button:focus-visible,
.btn:focus-visible {
    border-color: var(--clr-bg);
}


input,
input::file-selector-button {
    border: 1px solid black;
    border-radius: 2px;
}

button,
.button,
.btn {
    display: inline-block;
    background-color: var(--clr-text);
    color: var(--clr-text-light);
    border: 0;
    border-radius: 6px;
    padding: 1rex 2.5rex;

    font-weight: bold;
    text-decoration: none;

    &:hover,
    &:focus-visible {
        background-color: var(--clr-accent);
        color: var(--clr-text-light);
        /* outline-color: transparent; */
    }
    
    &:disabled {
        background-color: var(--clr-disabled);
    }
}

input[type="file"] {
    border: revert;
}

/* input[type="email"], */
/* input[type="text"], */
/* input[type="search"], */
/* input[type="number"], */
/* input[type="password"] { */
/*     width: var(--width-text-input); */
/* } */

/* END Forms */

.pad-tb-05 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.bg-white {
    background-color: white;
}

.border-top {
    border-top: 1px solid black;
}

.border-bottom {
    border-bottom: 1px solid black;
}

.border-bottom-dbl {
    border-bottom: 3px double black;
}

.center {
    text-align: center;
}

.color-warn {
    color: red;
}

.flow {
    display: flex;
    gap: 1rem;
}

.italic {
    font-style: italic;
}

.no-border {
    border: none;
    outline: none;
}

.opacity-30 {
    opacity: 30%;
}

.pad-left-4px {
    padding-left: 4px;
}

.pad-right-4px {
    padding-right: 4px;
}


.sticky-column {
    position: sticky;
    top: 0;
    z-index: 2;
}

.sticky-row {
    position: sticky;
    left: 0;
    z-index: 1;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.weight-normal {
    font-weight: normal;
}

.width-7rem {
    width: 7rem;
}

.green {
    color: green;
}

.red {
    color: red;
}

.uga-white-on-red {
    background-color: var(--clr-brand);
    color: var(--clr-bg);
}

.uga-white-on-black {
    background-color: black;
    color: var(--clr-bg);
}

.uga-gradient-right {
    background: linear-gradient(to right, black, var(--clr-brand));
}

.uga-gradient-left {
    background: linear-gradient(to left, black, var(--clr-brand));
}

li.htmx-swapping,
tr.htmx-swapping,
tr.htmx-swapping td {
    opacity: 0;
    transition: opacity 500ms;
}

table.with-row-numbers {
    tbody {
        counter-reset: rowNumber;
    }

    tr {
        counter-increment: rowNumber;
    }

    td.row-number::before {
        content: counter(rowNumber);
    }
}

/* Project Item */
ul.project-item-list {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.project-item {
    display: grid;
    gap: 1rem;

    background-color: var(--clr-card-bg);
    border: solid 1px var(--clr-border);
    border-radius: 0.5rem;
    box-shadow: 2px 2px var(--clr-border);

    padding: 1rem;
}

.project-item .project-actions {
    display: grid;
    gap: 0.5rem;
}

@media(min-width: 400px) {
    .project-item {
        display: flex;
        justify-content: space-between;
        align-items: start;
        max-inline-size: 45ch;
    }
}

/* END Project Item */

/* Search and Select */
.drop-down {
    position: relative;
}

.drop-down a {
    text-decoration: none;
}

.drop-down a,
.drop-down span {
    display: block;
    padding: 0.5rem 1rem;
    margin: 3px;
}

.drop-down a:hover {
    background-color: var(--clr-accent-dark);
    color: var(--clr-text-light);
}

.drop-down .content {
    background-color: white;
    border: 1px solid black;
    border-radius: 2px;
    width: var(--width-text-input);
    visibility: hidden;
    opacity: 0;
    transition: 250ms;
    position: absolute;
    top: 100%;
    left: 0;
    height: calc(14px + 3 * (1rem + var(--amt-line-height)));
    overflow: auto;
    z-index: 1;
}

.drop-down:focus-within>.content {
    visibility: visible;
    opacity: 1;
}

.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 8rem;
    padding: 0.175rem;
}

/* END Search and Select */

/* Content Grid */
.content-grid,
.full-width {
    --row-gap: 1rem;
    --padding-inline: 1rem;
    --content-max-width: 100%;

    --content-width: min(100% - var(--padding-inline) * 2, var(--content-max-width));

    display: grid;
    row-gap: var(--row-gap);
    grid-template-columns:
        [full-start] minmax(var(--padding-inline), 1fr) 
        [content-start] var(--content-width) [content-end]
        minmax(var(--padding-inline), 1fr) [full-end];
}

.content-grid > *,
.full-width > * {
    grid-column: content;
}

.content-grid > .full-width {
    grid-column: full;
}

.content-grid table {
    grid-column: full;
    justify-self: start;
}
/* END Content Grid */

/* Swatch */
ul.swatch {
    display: grid;
    gap: 1rem;
    font-weight: bold;
    justify-self: center;
    width: min(50ch, 100% - 1rem); 

    & li.color-area {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border: solid 1px black;
        color: white;

        .color-alt {
            color: black;
        }

        .color-text {
            background: white;
            text-align: center;
        }
    }


}


/* END Swatch */

@media print {
    body {
        background-color: white;
    }

    nav {
        display: none;
    }
}
