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

html {
    font-family: sans-serif;
    font-size: 62.5%;
}

body {
    font-size: 1.8rem;
    margin: 0;
    text-align: center;
}

html, body {
    min-height: 100%;
}

header {
    background-color: #222;
    color: #fff;
    font-weight: bold;
    padding: 3rem 0;
}

header.error {
    background-color: #a62e2e;
}

header h1 {
    color: #fff;
    display: inline-block;
    font-size: 1.65em;
    margin: 3rem;
    text-transform: uppercase;
    vertical-align: middle;
}

header img {
    display: inline-block;
    margin: 0 auto;
    max-width: 100%;
    -webkit-user-select: none;
    user-select: none;
    vertical-align: middle !important;
}

nav,
nav *,
nav *::before,
nav *::after {
    -webkit-user-select: none;
    user-select: none;
}

nav {
    line-height: 6rem;
}

nav a {
    color: #bbb;
    display: inline-block;
    font-size: 0.9em;
    font-weight: bold;
    line-height: 2rem;
    margin: 0 0.5rem;
    padding: 1rem 1rem;
    text-transform: uppercase;
    vertical-align: middle;
}

nav a.active {
    color: #2e58a6;
}

nav a#twitch.active {
    color: #6441a5;
}

nav a.admin {
    color: #c3040c;
}

nav a.home {
    color: #43a32b;
}

nav a:not(.button):hover {
    color: #000 !important;
}

a.button {
    cursor: pointer;
}

dfn {
    cursor: help;
}

nav a.button {
    margin: 0 !important;
}

main {
    padding: 2rem 0;
}

footer {
    font-size: 0.8em;
    margin: 4rem auto 10rem;
    text-align: right;
}

footer a {
    color: #ccc;
    text-decoration: none;
}

footer a:hover {
    color: #2e58a6;
}

header > div,
nav > div,
main > div,
footer > div {
    margin: 0 auto;
    max-width: calc(100vw - 6rem);
    width: 720px;
}

a {
    color: #2e58a6;
    text-decoration: none;
}

main p {
    color: #777;
    line-height: 1.5em;
}

a.button {
    background-color: #2e58a6;
    color: #fff;
    display: inline-block;
    font-style: italic;
    font-weight: bold;
    line-height: 5rem;
    margin: 2rem auto;
    padding: 0 3rem;
    position: relative;
    text-transform: uppercase;
}

a.button:hover {
    background-color: #000;
}

h2 {
    font-style: italic;
    margin-top: 7rem;
    text-transform: uppercase;
}

h3 {
    color: #c8c8c8;
    margin-top: 5rem;
    text-transform: uppercase;
}

hr {
    background-color: #ddd;
    border: none;
    margin: 5rem auto;
    height: 1px;
}

ul.bullet-list {
    margin: 0 auto;
    text-align: left;
}

ul.bullet-list li {
    color: #777;
    margin-bottom: 1rem;
}

ul:not(.runners):not(.bullet-list) {
    margin: 0 auto;
    text-align: left;
    width: 150px;
}

ul.runners {
    padding: 0;
}

ul.runners li {
    display: inline-block;
    list-style-type: none;
    margin: 0.8rem 1rem;
}

ul.runners li a {
    color: #2e58a6;
    font-weight: bold;
    text-transform: uppercase;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
    width: 100%;
}

th, td {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 1rem;
    vertical-align: top;
}

.centered {
    text-align: center !important;
}

td.empty {
    background-color: #f7f7f7 !important;
    color: #333 !important;
}

tr.small > td,
td.empty,
td.small {
    font-size: 80%;
}

td.empty a {
    font-weight: 700;
}

td[colspan]:first-child {
    background-color: #333;
    color: #fff;
}

.hidden {
    display: none !important;
}

#incentives {
    height: 100%;
}

#incentives td.centered:first-child {
    background-color: #555;
    color: #fff;
}

#incentives td {
    border: 1px solid #ccc;
    height: 100%;
    padding: 1rem 1rem;
    vertical-align: top;
}

#incentives tbody:not(.heading)::after {
    content: '';
    display: table-row;
    height: 2rem;
}

#incentives .option {
    background-color: #333;
    border-left: 1px solid #eee;
    color: #fff;
    text-align: center;
}

#incentives .help {
    cursor: help;
}

#incentives .buttons {
    padding: 0;
}

#incentives .buttons button {
    border: 0;
    cursor: pointer;
    color: #fff;
    display: inline-block;
    height: 100%;
    width: 100%;
    text-align: center;
    vertical-align: middle;
}

#incentives .buttons button i {
    display: inline-block;
}

button,
button *,
button *::before,
button *::after,
.button,
.button *,
.button *::before,
.button *::after {
    -webkit-user-select: none;
    user-select: none;
}

button:hover,
.button:hover {
    background-color: #000 !important;
}

button.disabled,
.button.disabled {
    background-color: #555555 !important;
}

button.close,
.button.close,
button.delete,
.button.delete {
    background-color: #c3040c;
}

button.open,
.button.open,
button.redeem,
.button.redeem {
    background-color: #43a32b;
}

#incentives .new {
    background-color: #2e58a6 !important;
    padding: 0.2rem 1rem 0.2rem;
}

#incentives th[title] {
    cursor: help;
}

#incentives .title span::after,
#incentives th[title]::after {
    color: #000;
    display: inline-block;
    vertical-align: top;
    font-family: 'Pe-icon-7-stroke';
    speak: none;
    font-style: normal;
    font-weight: 700;
    font-variant: normal;
    padding: 1px 0 0 3px;
    text-transform: none;
    line-height: 100%;

    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\e64a";
}

#incentives tr.clickable:hover .new {
    background-color: #000 !important;
}

#incentives .amount {
    width: 15%;
}

table .expired {
    color: #c3040c;
    font-weight: 700;
}

table .matched {
    color: #43a32b;
    font-weight: 700;
}

#incentives .title {
    width: 30%;
}

#incentives .title[title] {
    cursor: help;
}

#incentives .title a {
    font-weight: 700;
}

#incentives tr.clickable {
    cursor: pointer !important;
}

#incentives tr.clickable:hover {
    background-color: #edaa48 !important;
}

#incentives .type,
#incentives .option {
    width: 10%;
}

td blockquote {
    margin: 0;
}

tr.current {
    background-color: #edaa48 !important;
}

tbody:not(.heading) tr:nth-child(even) {
    background-color: #f8f8f8;
}

tbody:not(.heading) tr:nth-child(odd) {
    background-color: #e8e8e8;
}

a.youtube:first-child,
a.twitch:first-child {
    margin-left: 0 !important;
}

a.youtube:last-child,
a.twitch:last-child {
    margin-right: 0 !important;
}

a.youtube:not([href=""]),
a.twitch:not([href=""]) {
    background: transparent none center center no-repeat;
    background-size: 100%;
    display: inline-block;
    margin: 0 0.5rem;
    width: 2rem;
    height: 2rem;
}

a.youtube {
    background-image: url('../images/youtube.webp') !important;
}

a.twitch {
    background-image: url('../images/twitch.webp') !important;
}

img.twitch {
    display: inline-block;
    height: 24px;
    margin: -2px 2px 0 -4px;
    vertical-align: middle;
    width: 24px;
}

form[name=donation] label {
    margin: 2rem 0 0;
}

form[name=donation] textarea {
    box-sizing: border-box;
    display: block;
    margin: 2rem auto;
    padding: 1rem;
    width: 50%;
}

form[name=donation] textarea::placeholder {
    color: #AAA;
}

#overlay {
    background-color: rgba(0, 0, 0, 80%);
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
}

#modal {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    left: 50%;
    padding: 4rem;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    min-width: 640px;
}

#modal h2 {
    margin-top: 0;
}

#modal .amount {
    border: 0;
    font-size: 150%;
    font-style: italic;
    margin: 1rem 0;
    padding: 1rem 0;
    text-align: center;
    width: 100%;
}

#modal .option {
    border: 0;
    font-size: 150%;
    font-style: italic;
    margin: 1rem 0;
    padding: 1rem 0;
    text-align: center;
    width: 70%;
}

#modal .option[disabled] {
    background-color: #fff;
    color: #aaa;
    -webkit-user-select: none;
    user-select: none;
}

#modal .button {
    margin-bottom: 0;
}

#modal .button.delete {
    background-color: #c3040c;
}

#modal .button.delete:hover {
    background-color: #000;
}

#modal .error {
    color: #c3040c;
}

#modal .success {
    color: #43a32b;
}

.giveaways {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4rem;
}

.giveaway-image {
    margin-bottom: 4rem;
    max-width: 100%;
    width: 36rem;
}

@media screen and (orientation: portrait) {
    main p {
        text-align: left;
    }

    main > h2,
    main > h3 {
        text-align: center;
    }

    header > div.fullwidth,
    nav > div.fullwidth,
    main > div.fullwidth,
    footer > div.fullwidth {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    a.button {
        display: block;
    }

    footer {
        text-align: center;
    }

    form[name=donation] textarea {
        margin: 4rem 0;
        width: 100%;
    }

    nav a.button {
        display: inline-block !important;
    }

    table {
        font-size: 1.3rem;
    }

    th, td {
        padding: 1rem 0.4rem;
    }

    td.wrap {
        word-break: break-all;
    }

    th.collapse, td.collapse {
        display: none;
    }

    tr.small > td:not(.small),
    td.empty {
        font-size: 100%;
    }

    ul.bullet-list {
        padding: 0 0 0 2rem;
    }

    ul.bullet-list li {
        line-height: 2.5rem;
    }

    #incentives td {
        padding: 1rem 1rem;
        vertical-align: middle;
    }

    #overlay {
        background-color: #fff;
        height: 100%;
        left: 0;
        position: fixed;
        top: 0;
        width: 100%;
    }

    #modal {
        background-color: #fff;
        border: 0;
        border-radius: 0;
        height: 100%;
        padding: 4rem;
        position: absolute;
        max-width: 100%;
        min-width: 100%;
        top: 50%;
    }

    #modal h2 {
        margin-top: 0;
    }

    #modal p {
        text-align: center;
    }

    #modal .option {
        border: 0;
        font-size: 150%;
        font-style: italic;
        margin: 1rem 0;
        padding: 1rem 0;
        text-align: center;
        width: 70%;
    }
}

@media screen and (min-width: 1290px) {
    table {
        margin: 0 -15rem;
        width: calc(100% + 30rem);
    }
}
