body {
    font-family: 'Fira Sans', sans-serif;
    --color-foreground: white;
    --color-background: #efefef;

    --color-primary: #ec5b22;
    --color-primary-hover: #ffe1d5;

    --color-special: #ec2222;
    --color-special-hover: #ec222233;

    --color-hint: #fff1ab;

    --color-button: #fff5e4;

    --color-text-primary: black;
    --color-text-secondary: #5f5f5e;

    --color-wood: #fdd09d;

    --scale-pizza-mini:        0.3;
    --scale-pizza-small:       0.5;
    --scale-pizza-medium:      0.65;
    --scale-pizza-large:       0.8;
    --scale-pizza-extra-large: 1.0;
    --scale-pizza-mega:        1.1;

    background-color: var(--color-background);
    color: var(--color-text-primary);
    margin: 0;
    padding: 0;
}

ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

a {
    text-decoration: none;
}

h2 {
    font-size: 24pt;
}

#content {
    background: var(--color-foreground);
    padding: 32px;
    border-radius: 32px;
    max-width: 1200px;
    margin: 32px auto;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

#pizza-picker {
    display: flex;
    flex-direction: row;
    column-gap: 36px;
}

.picker-column {
    flex: 1;
}

#form {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
}

#pizza-wrapper {
    position: relative;
    padding: 64px 0;
    background-color: var(--color-wood);
    border-top-left-radius: 50% 128px;
    border-top-right-radius: 50% 128px;
    border-bottom-left-radius: 64px;
    border-bottom-right-radius: 64px;
    background-image: url(../img/peel.jpg);
    background-size: cover;
    box-shadow:
        rgba(0, 0, 0, 0.2) 0px 20px 30px,
        0 24px 4px rgba(121, 72, 18, 0.2) inset,
        0 12px 10px rgba(121, 72, 18, 0.2) inset;
}

#pizza {
    transition: opacity 0.2s ease, scale 0.15s ease;
}

#pizza[data-size="mini"] {
    scale: var(--scale-pizza-mini);
}

#pizza[data-size="small"] {
    scale: var(--scale-pizza-small);
}

#pizza[data-size="medium"] {
    scale: var(--scale-pizza-medium);
}

#pizza[data-size="large"] {
    scale: var(--scale-pizza-large);
}

#pizza[data-size="extra-large"] {
    scale: var(--scale-pizza-extra-large);
}

#pizza[data-size="mega"] {
    scale: var(--scale-pizza-mega);
}

#pizza-loader {
    position: absolute;
    top: 0px;
    right: 0;
    bottom: 42px; /* align with the center of the pizza */
    left: 0;
    width: 72px;
    height: 72px;
    border: 5px solid white;
    border-bottom-color: transparent;
    margin: auto;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: spinner 1s linear infinite;
    transition: opacity 0.2s ease;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

body.loading-pizza-textures #toppings,
body.loading-pizza-textures #pizza {
    pointer-events: none;
    opacity: 0.8;
}

body:not(.loading-pizza-textures) #pizza-loader {
    opacity: 0;
}



/* -- sizes -- */

#sizes {
    display: flex;
    flex-direction: row;
    column-gap: 32px;
    justify-content: center;
}

#sizes li {
    font-size: 16pt;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    align-content: center;
    text-align: center;
    border-radius: 100%;
    user-select: none;
    font-weight: bold;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
    transition: box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

#sizes li:hover {
    background-color: var(--color-primary-hover);
}

#sizes li.selected {
    background-color: var(--color-primary);
    color: var(--color-foreground);
    box-shadow: none;
}

/* -- easter egg -- */

body:not(.easter-egg-enabled) #sizes li.easter-egg,
body:not(.easter-egg-enabled) #pizza-separators svg.easter-egg {
    display: none;
}

#sizes li.easter-egg {
    animation:
        show-secret-size 2s ease,
        shake 0.5s ease 1.5s 1 normal both;
}

#sizes li.easter-egg:hover {
    background-color: var(--color-special-hover);
}

#sizes li.easter-egg.selected {
    background-color: var(--color-special);
}

@keyframes show-secret-size {
    0%, 75% {
        background-color: var(--color-special);
        color: white;
        pointer-events: none;
        box-shadow: 0 0 20px rgba(236, 34, 34, 0.7);
    }
    0% {
        opacity: 0;
    }
    50%, 75% {
        opacity: 1;
    }
    100% {
        background-color: var(--color-foreground);
        color: revert;
        box-shadow: none;
        pointer-events: all;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0%);
    }
    15% {
        transform: translateX(-20px);
    }
    30% {
        transform: translateX(10px);
    }
    45% {
        transform: translateX(-10px);
    }
    60% {
        transform: translateX(6px);
    }
    75% {
        transform: translateX(-4px);
    }
}


@keyframes fade {
    0%   { opacity: 0; }
    100% { opacity: 100%; }
}

#pizza-size-description {
    text-align: center;
}

#pizza-size-info {
    display: flex;
    flex-direction: row;
    column-gap: 32px;
    justify-content: center;
}

#pizza-size-info li {
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    column-gap: 8px;
    box-shadow:
        rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
        rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}

#pizza-size-info li b {
    font-size: 24pt;
}

/* giving them min-widths so they don't push the other text */

#pizza-serving b {
    min-width: 54px;
}

#pizza-topping b {
    min-width: 24px;
}

/* -- toppings -- */

#topping-start {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 16px 0;
}

#clear-toppings {
    background-color: transparent;
    border: none;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 12pt;
    cursor: pointer;
    padding: 0 8px;
}

#toppings {
    border-radius: 16px;
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    max-height: 325px;
    overflow-y: scroll;
    padding: 8px;
}

.topping {
    border-radius: 8px;
    background-color: white;
    padding: 16px;
    user-select: none;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 16px;
    transition: opacity 0.2s ease;
}

.topping.selected {
    background-color: var(--color-primary);
    color: var(--color-foreground);
}

#toppings.maxed-out .topping:not(.selected) {
    pointer-events: none;
    opacity: 0.6;
}

.topping img {
    width: 64px;
    border-radius: 100%;
}

.topping-info {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
}

.topping-info h3, .topping-info p {
    margin: 0;
}


.topping-info h3 {
    font-family: 'Cookie';
    font-size: 24pt;
    font-weight: normal;
}

.topping:not(.selected) .topping-info p {
    color: var(--color-text-secondary);
}

#footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: 24px;
}

#add-to-cart {
    background-color: var(--color-primary);
    font-size: 14pt;
    padding: 12px 128px;
    border-radius: 24px;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* -- order modal -- */

#modal-order-content {
    margin-bottom: 0;
}

#order-json {
    padding: 8px;
    border-radius: 8px;
    font-size: 16pt;
    /* simulate a terminal */
    background-color: #1c1d2b;
    color: white;
}

.order-key, .order-secret-size {
    font-weight: bold;
}

.order-secret-size {
    color: var(--color-special);
    text-shadow: 0 0 16px var(--color-special);
}

#pizza-separators {
    display: flex;
    flex-direction: row;
    column-gap: 16px;
    justify-content: center;
}

#pizza-separators svg {
    fill: var(--color-primary);
    width: 24px;
    height: 24px;
}

#github-links {
    display: flex;
    flex-direction: row;
    column-gap: 32px;
}

.link {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 8px;
    flex: 1;
    padding: 12px 24px;
}

.link > img,
.link > svg {
    width: 64px;
    height: 64px;
}

.link-info {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    flex: 1;
    text-align: center;
}

.link-info h2, .link-info p {
    margin: 0;
}

.link-info h2 {
    font-size: 14pt;
}

.link-info p {
    font-size: 11pt;
    opacity: 0.8; /* to work as secondary color */
}

.link-icon-wrapper {
    display: flex;
    align-content: center;
    text-align: right;
}

/* -- project link -- */

#link-project {
    background-color: black;
    color: white;
}

/* -- profile link -- */

#link-profile {
    background-color: #1e1f38;
    color: white;
}

#link-profile img {
    border-radius: 100%;
}

#link-profile #profile-name {
    font-family: monospace;
    color: #7dff7d;
}

#hint-easter-egg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--color-hint);
    padding: 24px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    transform: translateY(256px);
    transition: transform 0.75s ease;
}

#hint-easter-egg.show {
    transform: translateY(0);
}

#hint-easter-egg * {
    margin: 0;
}

#hint-easter-egg h2 {
    font-size: 16pt;
}
