/* -------------------------------------- utilities */
.clearFix:after{
	content: "";
	display: table;
	clear:both;
}
:root {
    /* color for use with white text, or on a white background*/
    --primary-dark: #b65747;
    --secondary: #a74165;
    --tertiary: #943b9f;
    --quaternary: #693dae;
    /*color for use with dark text or on a dark background */
    --primary-light: #b67e19;


    --primary-lightened: #faeeef;
    --quaternary-lightened: #ede7f5;


    --background: var(--primary-dark);
    --light-text: white;
    --dark-text: rgb(32, 31, 30);
}



/* ------------------------------------------------------------Typography */
html {
    font-family: 'Calibri', sans-serif;
    font-size: 125%;
    line-height: 1.5em;
    font-weight: normal;
}
  
body {
    color: var(--light-text);
    margin: 0;
}
  
h1, h2, h3, h4, h5, h6, ul, ol, li, p {
    margin: 0;
    padding: 0;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    font-size: inherit;
    font-family: inherit;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Calibri Light', sans-serif;
    font-weight: 900;
}
  
h1 {
    font-size: 36px;
    line-height: 1.5;
    margin: 0;
}
  
h2 {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 8px;
}
  
p {
    margin-bottom: 1.5em;
}
  
p:last-child {
    margin-bottom: 0;
}

nav a, nav a:visited, nav a:hover, nav a:focus {
    text-decoration: none;
}

.banner h2 {
    text-transform: uppercase;
    font-family: "Calibri Light", sans-serif;
    letter-spacing: 0.1em;
}
/**** Links *****/
a:not(.btn), a:visited:not(.btn) {
    color: var(--light-text);
    font-weight: bold;
    font-family: monospace;
    font-size: 16px;
}
a:hover:not(.btn), a:focus:not(.btn) {
    color: var(--quaternary-lightened);
    text-transform: uppercase;
}
/**** Buttons *****/
a.btn, button {
    color: var(--primary-lightened);
    text-transform: uppercase;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5em;
}
a.btn:hover, a.btn:focus,
button:hover, button:focus {
    color: var(--quaternary);
}

a.btn:disabled, button:disabled,
a.btn:disabled:hover, button:disabled:hover 
a.btn:disabled:focus, button:disabled:focus {
    color: #444;
}

nav a:hover, nav a:focus,
h1 a:hover, h1 a:focus {
    text-transform: initial;
}

/* ------------------------------------------------------------ General */
body, html {
    height: 100%;
    background: var(--background);
}
a.btn, button {
    text-decoration: none;
    border: none;
    border-radius: 3px;
    background: var(--quaternary);
    padding: 4px 16px;
    display: flex;
    align-items: center;
    width: max-content;
}

a.btn:hover, a.btn:focus,
button:hover, button:focus{
    background: var(--quaternary-lightened);
}

a.btn:disabled, button:disabled,
a.btn:disabled:hover, button:disabled:hover 
a.btn:disabled:focus, button:disabled:focus {
    background-color: #ccc;
}
a.btn i:first-child:not(:last-child), button i:first-child:not(:last-child) {
    margin-right: 8px;
}
a.btn i:last-child:not(:first-child), button i:last-child:not(:first-child) {
    margin-left: 8px;
}

div#caption {
    position: absolute;
    background: var(--dark-text);
    color: var(--light-text);
    padding: 5px 10px;
    border-radius: 3px;
    margin: 0;
    text-align: center;
    font-size: 1em;
    opacity: 0.7;
    filter: alpha(opacity=90);
    z-index: 100000;
    font-variant: small-caps;
}

#template.template {
    display: none;
}

.form-field {
    margin-bottom: 16px;
}
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    line-height: 16px;
    height: 32px;
    font-size: 16px;
    padding: 4px 8px;
    display: block;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--quaternary);
    color: var(--light-text);
}
.form-field input:focus, .form-field input:hover,
.form-field select:focus, .form-field select:hover,
.form-field textarea:focus, .form-field textarea:hover {
    border-color: var(--light-text);
    border-bottom-width: 3px;
    padding-bottom: 3px;
    outline: none;
} 
.form-field input[type="checkbox"]:focus, 
.form-field input[type="checkbox"]:hover {
    outline: initial; 
} 

.form-field select {
    padding: 1px 4px;
}
.form-field select:hover, .form-field select:focus {
    padding-bottom: 0;
}

.form-field select option {
    color: var(--dark-text);
}
.form-field .form-error {
    position: absolute;
    text-align: left;
    font-family:'Courier New', Courier, monospace;
    font-size: 14px;
    margin-top: 0;
    padding-left: 8px;
}

input::placeholder, textarea::placeholder {
    color: var(--light-text);
    opacity: 0.7;
}

.form-field label {
    font-size: 14px;
    line-height: 14px;
    padding: 0 7px;
    font-weight: bold;
}

.form-field input:read-only {
    background: transparent;
    opacity: 0.8;
    border: none;
    color: var(--light-text);
}
.form-field input:read-only {
    padding-bottom: 4px;
}

.message {
    display: flex;
    position: fixed;
    top: 32px;
    background: var(--light-text);
    color: var(--primary-dark);
    border-radius: 4px;
    padding: 4px 8px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 6px 12px #00000040;
}
.message button {
    margin-left: 4px;
    background-color: transparent;
    color: var(--primary-dark);
    cursor: pointer;
}
.message button:hover, .message button:focus {
    color: var(--quaternary);
}

.modal {
    z-index: 10;
}

.modal .modal-content {
    z-index: 1;
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    min-height: 200px;
    border-radius: 4px;
    box-shadow: 0 6px 12px #00000040;
    background: white;
    color: var(--primary-dark);
    padding: 16px;
}

.modal .modal-content:empty,
.modal .modal-content:empty + .modal-overlay {
    display: none;
}

.modal .modal-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.5;
    background: var(--dark-text);
}

/* ------------------------------------------------------------ Header/Navigation */

header.header nav {
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 16px;
}

nav h1 {
    margin-right: 16px;
    height: 64px;
    width: 64px;
    flex-shrink: 0;
}

nav h1 a, nav h1 img {
    height: 100%;
}

nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

nav a span {
    opacity: 0;
}
nav a .fas {
    opacity: 0.7;
    line-height: 16px;
    font-size: 20px;
}
nav a.active .fas, nav a.active span,
nav a:hover .fas, nav a:hover span,
nav a:focus .fas, nav a:focus span {
    font-weight: bold;
    opacity: 1;
}

nav a.active .fas,
nav a:hover .fas,
nav a:focus .fas {
    font-size: 24px;
}


/* portrait tablet */
@media (min-width: 600px) {
    header.header nav {
        justify-content: flex-start;
    }

    nav a {
        margin-right: 8px;
    }
}

/* landscape tablet */
@media (min-width: 905px) {
    header.header nav {
        height: 100%;
        width: auto;
        flex-direction: column;
    }

    nav a, nav h1 {
        margin-right: 0;
        margin-bottom: 32px;
    }
    nav a {
        height: initial;
    }
}

/* ------------------------------------------------------------ Main */

section header, aside header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

section, aside {
    border-radius: 4px;
    min-height: 120px;
}

.btn-holder {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    margin-top: 16px;
}
.btn-holder 
.btn-holder .btn i {
    padding-right: 4px;
}


.button-link {
    margin-right: 16px;
    background-color: transparent;
    color: var(--primary-lightened);
    text-decoration: underline;
    padding: 0;
    cursor: pointer;
}
.button-link:hover, .button-link:focus {
    font-weight: bold;
    background-color: transparent;
    color: var(--primary-lightened);
}
.filters {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
}
.filters button.filter {
    border-radius: 20px;
    margin-right: 8px;
    text-transform: none;
}
.filters button.filter:nth-child(3n + 1) {
    background-color: var(--secondary);
}
.filters button.filter:nth-child(3n + 2) {
    background-color: var(--tertiary);
}
.filters button.filter:nth-child(3n + 1):hover,
.filters button.filter:nth-child(3n + 1):focus,
.filters button.filter:nth-child(3n + 2):hover,
.filters button.filter:nth-child(3n + 2):focus {
    background-color: var(--primary-lightened);
}

/* ------------------------------------------------------------ Table */
table {
    width: 100%;
}

.grid table {
    grid-column: 1 / -1;
}

.grid table .grid {
    grid-template-rows: auto;
}


/* ------------------------------------------------------------ Footer */
footer {
    margin-top: auto;
    min-height: 48px;
    display: flex;
    align-items: center;
    flex-direction: column;
}



/* ------------------------------------------------------------ Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: min-content auto min-content;
    column-gap: 8px;
    row-gap: 16px;
    margin: 0 16px;
}

.grid .grid {
    margin: 0;
    grid-template-rows: min-content;
}

.grid header.header {
    grid-column: 1 / -1;
    grid-row: 1 / 1;
}

.grid main {
    grid-column: 1 / -1;
    grid-row: 2 / span 1;
}

.grid footer {
    grid-column: 1 / -1;
    grid-row: 3 / span 1;
}

section, aside, .btn-holder {
    grid-column: 1 / -1;
}

section, aside, table {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
section, aside {
    padding: 8px;
}
table tr {
    padding: 0 8px;
}

table thead tr {
    border-bottom: 2px solid var(--quaternary);
    margin-bottom: 0 !important;
}

table tr.grid {
    align-items: center;
}

table tbody tr:nth-child(odd) {
    background: rgba(0, 0, 0, 0.1);
}
table tr {
    margin: 0;
    padding-top: 16px;
    padding-bottom: 16px;
}

/* portrait tablet */
@media (min-width: 600px) {
    .grid{
        grid-template-columns: repeat(8, 1fr);
    }
}

/* landscape tablet */
@media (min-width: 905px) {
    .grid {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: auto min-content;
        margin: 0 32px;
        gap: 32px;
    }

    .grid .grid {
        grid-template-columns: repeat(10, 1fr);
        grid-template-rows: min-content auto;
    }

    .grid header.header {
        grid-column-end: span 2;
        grid-row-end: span 2;
    }

    .grid main, .grid footer {
        grid-column-start: 3;
    }

    .grid main {
        grid-row-start: 1;
    }

    .grid footer {
        grid-row-start: 2;
    }

    .grid section.half {
        grid-column-end: span 5;
    }
    .grid section.half {
        grid-column-start: 1;
    }
    .grid section.half + section.half {
        grid-column-start: 6;
    }

    .grid main > :first-child {
        margin-top: 16px;
    }
}

/* desktop */
@media (min-width: 1240px) {
    .grid header.header {
        grid-column-end: span 1;
    }

    .grid .grid {
        grid-template-columns: repeat(11, 1fr);
        margin: 0;
    }

    .grid main, .grid footer {
        grid-column-start: 2;
    }

    .grid aside {
        grid-column: 9 / span 3;
        grid-row: 1 / -1;
    }    
    .grid section.half {
        grid-column-end: span 4;
    }
    .grid section.half {
        grid-column-start: 1;
    }
    .grid section.half + section.half {
        grid-column-start: 5;
    }
}

castify-draw-container {
    display: none !important;
}