/* ===== Base Styles ===== */
body {
    font-family: sans-serif;
}

h1 {
    text-align: center;
}

canvas {
    background-color: white;
}

/* ===== Form Elements ===== */
input,
select,
label {
    cursor: pointer;
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked + .label {
    background: #9d9e9d;
    color: #fff;
}

input[type="color"] {
    appearance: none;
    border: black;
    align-self: center;
    border-radius: 20px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 20px;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 20px;
}

input[type="file"] {
    text-align: center;
}

textarea {
    border: none;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 10px;
    width: 340px;
}

select {
    border: none;
    background-color: #f1f1f1;
    border-radius: 20px;
    padding-left: 10px;
    padding-right: 10px;
    width: 100px;
}

/* ===== Custom UI Elements ===== */
.label {
    background: #f1f1f1;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    width: 70px;
    padding: 8px;
    user-select: none;
    transition: all;
}

.boldLabel.animate {
    animation: 500ms bold-shake forwards;
}

.squeezeLabel.animate {
    animation: 500ms condense-squeeze forwards;
}

.hidden {
    visibility: hidden;
}

.bold {
    font-weight: bold;
}

#downloadButton {
    width: 344px;
    color: white;
    background-color: black;
    font-weight: bold;
}

#downloadButton.animate {
    animation: 500ms pop-off forwards;
}

/* ===== Layout ===== */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
    align-items: center;
    gap: 2%;
}

.textOptions {
    display: flex;
    gap: 5px;
    align-items: stretch;
}

.credits {
    text-align: center;
    color: gray;
    font-size: 9pt;
}

.disclaimer {
    color: gray;
    font-weight: bold;
    font-size: 9pt;
}

.options {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 10px;
}

/* ===== Desktop Styles ===== */
@media (min-width: 600px) {
    #canvasLocation {
        justify-self: end;
    }
}

/* ===== Mobile Styles ===== */
@media only screen and (max-width: 850px) {
    #canvasLocation {
        align-self: center;
    }

    .options {
        align-self: center;
    }

    .content {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .textOptions {
        display: flex;
        gap: 5px;
        align-items: stretch;
        justify-content: center;
    }

    .label {
        align-items: stretch;
    }
}

@media only screen and (max-width: 500px) {
    #view {
        width: 90vw;
    }
}

/* ===== Animations ===== */
@keyframes bold-shake {
    0% {
        transform: rotate(0) scale(1);
    }
    13% {
        transform: rotate(-10deg) scale(0.8);
    }
    25% {
        transform: rotate(0) scale(0.8);
    }
    38% {
        transform: rotate(10deg) scale(0.8);
    }
    50% {
        transform: rotate(0deg) scale(0.8);
        font-weight: bold;
    }
    63% {
        transform: rotate(-10deg) scale(0.8);
    }
    75% {
        transform: rotate(0deg) scale(0.9);
    }
    100% {
        transform: rotate(0) scale(1);
    }
}

@keyframes condense-squeeze {
    0% {
        transform: scale(1);
        letter-spacing: normal;
    }
    13% {
        transform: scale(0.8);
    }
    50% {
        letter-spacing: -3px;
    }
    75% {
        transform: scale(0.8);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pop-off {
    0% {
        transform: rotate(0) scale(1);
    }
    13% {
        transform: rotate(-10deg) scale(1.2);
    }
    25% {
        width: 100px;
        transform: rotate(0) scale(1.2);
    }
    38% {
        transform: rotate(10deg) scale(1.2);
    }
    50% {
        transform: rotate(0deg) scale(1.2);
    }
    63% {
        transform: rotate(-10deg) scale(1.2);
    }
    75% {
        width: 100px;
        transform: rotate(0deg) scale(1.1);
    }
    100% {
        width: 344px;
        transform: rotate(0) scale(1);
    }
}
