body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #222;
    overflow: hidden;
    font-family: "Yrsa", serif;
    font-weight: 600;
    font-optical-sizing: auto;
    color: #334;
    --brand-primary: #fb1b3a;
    --brand-primary-lighter: #ee456b;
    --text-on-brand-color: white;
    --text-on-brand-shadow: 0 1px 15px rgba(0, 0, 0, 0.6);
    --active-selection-shadow: 0 0 10px -1px var(--brand-primary);
    --active-selection-shadow-lighter: 0 3px 11px -1px var(--brand-primary);
    --marker:
        "Covered By Your Grace", "Felt Marker", "Segoe Marker", "Comic Sans MS",
        "Comic Sans", sans-serif;
}
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}
#logo {
    user-select: none;
    font-family:
        "Helvetica Neue", "Open Sans", "Noto Sans", "Segoe UI", "Roboto",
        sans-serif;
    overflow: hidden;
    border-radius: 10px;
    position: absolute;
    top: 30px;
    left: 50%;
    width: 300px;
    height: 150px;
    background: #e5e5e5;
    text-align: center;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 15px -1px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%) rotate(2deg);
    transform-origin: center center;
}
#logo-top {
    background: var(--brand-primary);
    padding: 8px 0 12px;
    & > h1 {
        font-size: 20px;
        color: white;
        text-align: center;
        margin-top: 0;
        margin-bottom: 0;
        &:first-child {
            font-size: 30px;
        }
    }
}
#logo-bottom {
    position: relative;
    flex-grow: 1;
    & > h2 {
        position: absolute;
        width: 100%;
        font-family: var(--marker);
        font-size: 30px;
        margin: 0px 0;
        top: 50%;
        transform: translateY(-50%) rotate(-2deg);
    }
}
#logo-spacer {
    height: 220px;
    flex-shrink: 0;
}
#day-selection {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    font-size: 20px;
    & > .day-box {
        --border-radius: 10px;
        &:first-child {
            border-top-left-radius: var(--border-radius);
            border-bottom-left-radius: var(--border-radius);
        }
        &:last-child {
            border-top-right-radius: var(--border-radius);
            border-bottom-right-radius: var(--border-radius);
        }
        user-select: none;
        cursor: default;
        position: relative;
        border: solid 1px #333;
        width: 60px;
        height: 60px;
        text-align: center;
        background: #fa9a9a;
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        &:not(:first-child) {
            margin-left: -1px;
            &.unscheduled:not(.selected) {
                border-left: none;
                margin-left: 0;
            }
        }
        &.unscheduled {
            background: #999 !important;
            opacity: 0.4;
            z-index: -1;
        }
        &.available {
            cursor: pointer;
            background: #fafafa;
        }
        &.selected {
            z-index: 2;
            box-shadow: inset 0 0 0px 1px #261053;
            &.available {
                background: var(--brand-primary);
                color: var(--text-on-brand-color);
                text-shadow: var(--text-on-brand-shadow);
                border-color: var(--brand-primary);
                box-shadow: var(--active-selection-shadow);
            }
            border-color: #261053;
        }
    }
}
#day-message {
    text-align: center;
    margin-top: 20px;
    font-size: 32px;
    height: 45px;
    color: #eee;
}
#order-form {
    &.disabled {
        opacity: 0.6;
        pointer-events: none;
    }
    flex-grow: 1;
    overflow-y: auto;
    font-size: 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    color: #eee;
    & #order-builder {
        padding: 30px;
        flex-grow: 1;
        input[type="radio"] {
            display: none;
            & + label {
                display: inline-block;
                padding: 10px 20px;
                border-radius: 5px;
                background: #444;
                cursor: pointer;
                transition: background 0.3s ease;
                margin-right: 5px;
                &:hover {
                    background: #555;
                }
            }
            &:checked + label {
                background: var(--brand-primary);
                color: var(--text-on-brand-color);
                text-shadow: var(--text-on-brand-shadow);
                box-shadow: var(--active-selection-shadow);
            }
        }
        & .product-option {
            margin: 10px 0;
            & .label {
                font-size: 24px;
            }
            & .options-row {
            }
        }
        & .customer-name-entry {
            & > input {
                font-family: var(--marker);
                font-size: 25px;
                border-radius: 10px;
            }
        }
    }
    & #order-summary {
        min-width: 350px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.3);
        padding: 20px 0;
        box-sizing: content-box;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        color: #333;
        display: flex;
        flex-direction: column;
        & #order-summary-orders {
            flex-grow: 1;
            overflow-y: auto;
        }
        & .product {
            position: relative;
            padding: 10px 30px;
            border-radius: 10px;
            margin: 10px 0;
            background: rgba(255, 255, 255, 0.5);
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            & .customer-name {
                margin-left: -5px;
                font-family: var(--marker);
                font-size: 25px;
                border-radius: 10px;
                background: #eee;
                padding: 10px;
                margin-bottom: 10px;
            }
            & .options-container {
                display: grid;
                grid-template-columns: auto 1fr;
                grid-template-areas: "label value";
                background-color: rgba(255, 255, 255, 0.5);
                position: relative;
                left: -5px;
                margin-top: 20px;
                overflow: hidden;
                border-radius: 10px;
                & .option-label,
                & .option-value {
                    padding: 10px;
                }
                & .option-label {
                    text-align: left;
                }
                & .option-value {
                    padding-left: 20px;
                }
                & .option-label:nth-child(4n + 1),
                & .option-value:nth-child(4n + 2) {
                    background-color: #eee;
                }
            }
            & .remove-button {
                position: absolute;
                top: 10px;
                right: 10px;
                width: 20px;
                height: 20px;
                line-height: 0px;
                appearance: none;
                border: none;
                background-color: var(--brand-primary);
                cursor: pointer;
                color: var(--text-on-brand-color);
                text-shadow: var(--text-on-brand-shadow);
                border-radius: 4px;
                &:hover {
                    background-color: var(--brand-primary-lighter);
                }
            }
        }
        & #place-order {
            margin: 15px 20px 0;
        }
    }
}

.red-btn {
    appearance: none;
    border: none;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 20px;
    background-color: var(--brand-primary);
    color: var(--text-on-brand-color);
    text-shadow: var(--text-on-brand-shadow);
    border-radius: 4px;
    box-shadow: var(--active-selection-shadow);
    margin-top: 10px;
    transition: box-shadow 0.05s ease-in-out;
    &:not(:disabled):hover {
        box-shadow: var(--active-selection-shadow-lighter);
    }
    &:disabled {
        filter: grayscale(0.9);
        opacity: 0.5;
    }
}

.modal-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    color: #eee;
    min-width: 400px;
    min-height: 300px;
    text-align: center;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--active-selection-shadow);
    z-index: 1001;
    & .modal-header {
        text-align: left;
        position: relative;
        font-size: 22px;
        h2 {
            margin-top: 0;
            position: relative;
            top: -10px;
        }
    }
    & .close {
        position: absolute;
        right: 0;
        top: 0px;
    }
}
.login-container {
    color: #aeaeae;
    text-align: center;
    & label {
        font-size: 20px;
        margin-right: 10px;
    }
    & input[type="password"] {
        font-size: 21px;
        appearance: none;
        border: none;
        padding: 10px 20px;
        border-radius: 4px;
        box-shadow: var(--active-selection-shadow);
        transition: box-shadow 0.05s ease-in-out;
        background: #745;
        &:not(:disabled):hover {
            box-shadow: var(--active-selection-shadow-lighter);
        }
    }
    & .form-group {
        margin-bottom: 20px;
    }
    & #message {
        margin-top: 20px;
    }
}

@media (max-width: 670px) {
    #logo {
        width: 250px;
        height: 125px;
        & #logo-top {
            padding: 6px 0 9px;
            & > h1:first-child {
                font-size: 24px;
            }
            & > h1:last-child {
                font-size: 16px;
            }
        }
        & #logo-bottom {
            & > h2 {
                font-size: 34px;
            }
        }
    }
    #day-selection {
        transform: scale(0.85);
    }
    #order-form {
        flex-direction: column;
        width: 100%;
        #order-summary {
            min-width: auto;
        }
    }
    #day-message {
        height: auto;
        padding: 0 10px;
    }
}
@media (max-width: 360px) {
    #day-selection {
        width: 100%;
        transform: none;
        flex-wrap: wrap;
        .day-box {
            margin: 5px 0;
            &:first-child,
            &:last-child {
                border-radius: 0;
            }
        }
    }
}
