*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
}

body {
    height: 100dvh;
    width: 100dvw;
}

model-viewer {
    position: relative;
    height: 100%;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.de,
.fr,
.en {
    display: none;
}

body.de,
body.fr,
body.en {
    display: block;
}

body.de .de {
    display: initial;
}

body.fr .fr {
    display: initial;
}

body.en .en {
    display: initial;
}

.visibleX55,
.visibleX100,
.visibleX150,
.visibleQ30,
.visibleQ80,
.visibleRefyn .visibleRefynNoFabric {
    display: none;
}

body.x55 .visibleX55 {
    display: block;
}

body.x100 .visibleX100 {
    display: block;
}

body.x150 .visibleX150 {
    display: block;
}

body.q30 .visibleQ30 {
    display: block;
}

body.q80 .visibleQ80 {
    display: block;
}

body.refyn .visibleRefyn {
    display: block;
}

body.refyn .visibleRefynNoFabric {
    display: block;
}

body.refyn.fabric .visibleRefynNoFabric {
    display: none;
}

button {
    border: none;
    padding: 0.4em;
    cursor: pointer;
}

button:hover {
    background-color: #aaa;
}

select {
    appearance: base-select;
    border: 2px solid #dddddd;
    background: #eeeeee;
    padding: 10px;
    transition:
        background 0.2s,
        border-color 0.2s;
    border-radius: 8px;
}

select:hover,
select:focus {
    background: #dddddd;
}

::picker(select) {
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: clip;
    margin-block-start: 2px;
    min-inline-size: 100%;
    background: transparent;
    opacity: 0;
    transform: translateY(-2px);
    transition:
        opacity 0.18s,
        transform 0.18s;
}

select:open::picker(select) {
    opacity: 1;
    transform: translateY(0);
}

/* OPTION LOOKS (applies in engines that expose option styling) */
option {
    border: 2px solid #dddddd;
    background: #eeeeee;
    padding: 10px;
    transition: background 0.2s;
}

option:not(:last-of-type) {
    border-bottom: none;
}

option:nth-of-type(odd) {
    background: white;
}

option:hover,
option:focus {
    background: plum;
}

option:first-of-type {
    border-radius: 8px 8px 0 0;
}

option:last-of-type {
    border-radius: 0 0 8px 8px;
}

option:checked {
    font-weight: bold;
}

/* checkmark indicator shown on the selected option */
option::checkmark {
    order: 1;
    margin-left: auto;
    content: "☑️";
}

/* hide the default selected icon in the field (chrome’s base-select) */
selectedcontent .icon {
    display: none;
}

/* ---- COLOR PICKER ---- */
input[type="color"] {
    appearance: none; /* remove default styling */
    border: 2px solid #dddddd;
    background: #eeeeee;
    border-radius: 8px;
    width: 60px;
    height: 40px;
    padding: 4px;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.1s;
    vertical-align: middle;
}

/* the color well itself */
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 6px;
}
input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

/* same for firefox */
input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 6px;
}

input[type="color"]:hover,
input[type="color"]:focus {
    background: #dddddd;
    transform: translateY(-1px);
}

/* ---- RESET BUTTON ---- */
button.reset {
    border: 2px solid #dddddd;
    background: #eeeeee;
    border-radius: 8px;
    padding: 10px 16px;
    margin-left: 0.5rem;
    cursor: pointer;
    font: inherit;
    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.1s;
}

button.reset:hover,
button.reset:focus {
    background: #dddddd;
    transform: translateY(-1px);
}

button.reset:active {
    transform: translateY(0);
    background: #cccccc;
}

/* ---- OPTIONAL ALIGNMENT ---- */
#materialColorPicker,
#materialColorReset {
    vertical-align: middle;
}

/* make labels and controls line up nicely */
label[for="materialColorPicker"] {
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.3rem;
}

.controls {
    margin: 5vmin;
    width: fit-content;
}

.controls > div > div {
    margin: 0.4em 0;
}
