* {
    box-sizing: border-box;
}

html,
body {
    height: 100vh;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    font-family: Arial, sans-serif;
}

header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #111;
    color: #fff;
}

main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
    margin: .5rem;
}

.preview {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 220px;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: #eaeaea;
}

.lanes {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.lane {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}

.lane-label {
    flex: 0 0 auto;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #666;
    padding: .25rem .5rem;
    border-right: 1px solid #ddd;
    margin-right: .25rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.control {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 130px;
}

.control.wide {
    min-width: 180px;
}

.btn {
    background: #fff;
    color: #111;
    border: 0;
    padding: .5rem .9rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

#reset-button {
    background: #b91c1c;
    color: #fff;
}

.btn-group {
    display: flex;
    gap: 1rem;
}

label {
    font-weight: 600;
    color: #555;
}

input[type="range"],
select {
    width: 100%;
}

.swatch-box {
    margin-left: 2rem;
}

.swatches {
    display: flex;
    gap: .35rem;
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #777272;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

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

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

input[type="color"].active {
    border-color: #111;
}

#drop-zone-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#drop-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70%;
    max-width: 100%;
    height: 200px;
    padding: 1em;
    border: 1px solid #cccccc;
    border-radius: 4px;
    color: slategray;
    cursor: pointer;
}

#global-error {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    color: #b91c1c;
}

#global-error.is-error {
    display: flex;
    background: #fef2f2;
    border: 2px solid #fecaca;
}

#global-close-icon {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
}

#global-close-icon:hover {
    border: 2px solid #fecaca;
    border-radius: 50%;
}

#upload-error {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    color: #b91c1c;
}

#upload-error.is-error {
    display: flex;
    background: #fef2f2;
    border: 2px solid #fecaca;
}

#upload-close-icon {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
}

#upload-close-icon:hover {
    border: 2px solid #fecaca;
    border-radius: 50%;
}

.icon {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.icon svg {
    width: 100%;
    height: 100%;
}


#file-input {
    display: none;
}

#canvas {
    display: none;
    max-width: 100%;
    max-height: 100%;
}


@media (min-width: 760px) {
    main {
        flex-direction: row;
        margin: 1rem;
    }

    .preview,
    .lanes {
        flex: 1 1 50%;
    }

    #canvas {
        max-height: 80vh;
    }

    .slider-group {
        display: flex;
        flex-direction: row;
        gap: .75rem;
    }

    .btn-group {
        display: flex;
        gap: 1.5rem;
    }
}