@font-face {
    font-family: 'GT America';
    src: local('GT America'), url("./fonts/GT-America-Bold.8953507cb2e8.otf");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'GT America';
    src: local('GT America'), url("./fonts/GT-America-Regular.c5ab28104687.otf");
    font-weight: 400;
    font-style: normal;
}

body {
    display: flex;
    flex-flow: column wrap;
    align-items: start;

    font-family: GT America, sans-serif;
}

.canvas {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "empty header"
        "nav   main"
        "nav   footer";
    gap: 15px;
}

nav {
    grid-area: nav;
}

nav ul {
    display: flex;
    flex-flow: column wrap;
    justify-content: start;
    align-items: end;
    gap: 10px;
    list-style: none;
    margin: 0px;
}

nav li {
    border-bottom: 1px solid;
    border-right: 1px solid;
    border-color: #cfd0d0;
    padding: 5px;
}

nav li.active {
    background-color: #7fd7ba;
}

nav li a {
    color: #606060;
    text-decoration: none;
    font-size: 18px;
}

header {
    grid-area: header;

    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

header .heading {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

header img.logo {
    object-fit: contain;
    height: 40px;
}

header .title {
    color: #22242a;
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    margin: 15px;
}

header .project-select {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

header .project-select .select-options {
    display: flex;
    flex-flow: column wrap;
    align-items: end;
    gap: 3px;
}

header .project-select .select-options label {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    gap: 8px;

    width: 100%;
}

main {
    grid-area: main;

    padding-left: 25px;

    display: flex;
    flex-flow: column wrap;
    gap: 10px;
}

.main-message {
    font-size: 18px;
}

form {
    display: flex;
    flex-flow: column wrap;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-flow: row wrap;
    align-items: baseline;
    justify-content: end;
    gap: 15px;
}

.form-row > *:only-child {
    margin-left: auto;
}

.form-row label.description {
    display: flex;
    flex-flow: row wrap;
    align-items: start;
    width: 100%;
    gap: 5px;
}

.form-row label.description textarea {
    flex: 1;
}

.form-row input {
    margin: 5px;
}

.form-row select.name {
    min-width: 100px;
}

.form-row input[type=file]::file-selector-button {
    color: #FFF;
    background-color: #30BF91;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px;

    cursor: pointer;

    font-size: 100%;
    font-weight: 600;

    font-family: inherit;
}

.form-row input[type=file]:disabled::file-selector-button {
    background-color: #ced4db;
    cursor: default;
}

.item-actions {
    display: grid;
    grid-template-areas:
        "item-select delete empty"
        "item-select insert template-select"
    ;
    align-items: center;
    gap: 1px 60px;
}

.item-select {
    grid-area: item-select;
}

.item-delete {
    grid-area: delete;
}

.item-insert {
    grid-area: insert;
}

.template-select {
    grid-area: template-select;

    display: flex;
    flex-flow: column wrap;

    gap: 3px;
}

.template-item-select {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;

    gap: 30px;
}

.template-item-select label {
    flex-grow: 1;

    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

.submit-row {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: end;
    gap: 15px;

    margin-top: 5px;
}

.page-nav {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: end;
    gap: 4px;
}

table.selection {
    border-collapse: collapse;
    width: 100%;
}

table.selection tr {
    border: 1px solid #ddd;
}

table.selection th label {
    font-weight: normal;
}

table.selection th {
    background-color: #f5f5f5;
    padding: 8px;
    text-align: left;
}

table.selection td {
    padding: 8px;
    text-align: left;
}

table.selection td.select {
    text-align: right;
}

button[type="submit"] {
    align-self: end;

    color: #FFF;
    background-color: #30BF91;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px;

    cursor: pointer;

    font-size: 100%;
    font-weight: 600;

    font-family: inherit;
}

button[type="submit"]:disabled {
    background-color: #ced4db;
    cursor: default;
}

button.item-delete[type="submit"] {
    clip-path: url(#right-arrow);
    height: 39px; /* must be set explicitly for aspect-ratio to work; should match text height + padding */
    aspect-ratio: 5 / 2;
    padding-right: 20px;
    margin-left: 10px;
}

button.item-insert[type="submit"] {
    clip-path: url(#left-arrow);
    height: 39px; /* must be set explicitly for aspect-ratio to work; should match text height + padding */
    aspect-ratio: 5 / 2;
    padding-left: 20px;
    margin-right: 10px;
}

table.results {
    border: 0px;
    border-spacing: 0px;
    margin-left: 10px;
}

table.results caption {
    text-align: left;
    margin-bottom: 5px;
}

table.results caption div {
    display: flex;
    flex-flow: row wrap;
    gap: 4px;
    align-items: center;
}

table.results tr {
    border: 0px;
}

table.results td {
    border: 0px;

    padding: 5px 10px;
}

table.results td.loading {
    padding: 1px 10px;
}

table.results tr.primary {
    background-color: #30BF91;
}

table.results tr.secondary {
    background-color: #cfefe3;
}

table.results tr.primary.error {
    background-color: #F05A47;
}

table.results tr.secondary.error {
    background-color: #EFBAB3;
}

table.results tr.primary.pending {
    background-color: #BFBFBF;
}

table.results tr.secondary.pending {
    background-color: #EFEFEF;
}

table.results tr.primary.complete {
    background-color: #30BF91;
}

table.results tr.secondary.complete {
    background-color: #cfefe3;
}

table.results tr.primary.retrying {
    background-color: #F5F53D;
}

table.results tr.secondary.retrying {
    background-color: #FCFCB1;
}

table.results tr.primary.failed {
    background-color: #F05A47;
}

table.results tr.secondary.failed {
    background-color: #EFBAB3;
}

img.loading {
    width: 35px;
    height: 35px;
}

p.error {
    color: red;
}

span.error {
    color: red;
}

span.explanation {
    font-style: italic;
}

footer {
    grid-area: footer;

    padding-left: 25px;
}

a.back {
    display: flex;
    flex-flow: row wrap;
    gap: 4px;
    align-items: center;
    text-decoration: none;
}

a.back img {
    width: 15px;
    height: 15px;
    margin-top: 2px;
}

a.page-select {
    text-decoration: none;
}

a.page-select img {
    width: 15px;
    height: 15px;
    margin-top: 6px;
}

a.page-select[disabled] img {
    filter: invert(80%);
}