html,
body {
    height: 100%;
    font-size: 18px;
    font-family: "Ubuntu Mono", monospace;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

textarea,
input:not([type="submit"]) {
    font-size: 18px;
    font-family: "Ubuntu Mono", monospace;
}

header a {
    color: var(--text);
    text-decoration: none;
}

.sheet {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 3px;
}

.sheet pre {
    padding: 18px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* layout */
.item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
}

.data {
    flex: 1 1 auto;
    min-width: 0;
    /* allows content to truncate inside flex items */
    word-break: break-word;
    gap: 5px;

    .name {
        min-height: 22px;
    }
}

.controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* styled to look like button */
.controls a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    background: var(--button-bg);
    color: var(--text-on-color);
    border: 1px solid var(--button-border);
}

.controls a:hover {
    background: var(--button-bg-hover);
}

.meta {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .item {
        flex-direction: column;
        align-items: stretch;
    }

    .controls {
        justify-content: flex-end;
        margin-top: 8px;
    }
}

.button-large {
    padding: 14px 22px;
}

.padding-small {
    padding: 2px 4px;
}

.theme-settings {
    margin-top: 10px;
}

.layout-column {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.layout-row {
    display: flex;
    flex-direction: row;
    max-width: 100%;
    flex-shrink: 1;
    gap: 5px;
    align-items: baseline;
}

input {
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    color: var(--text)
}

select {
    background: var(--select-bg);
    border: 1px solid var(--border-medium);
    color: var(--text);
    border-radius: 3px;
    cursor: pointer;

    &:hover {
        background: var(--select-bg-hover);
    }
}

.hue-control {
    margin-top: 0.75rem;
    max-width: 420px;
    gap: 0.5em;

    .layout-row {
        align-items: center;
        gap: 1em;
    }
}

#hue-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 18px;
    border-radius: 9px;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 100% 100%;
    outline: none;
    cursor: pointer;
    /* small padding so thumb doesn't overflow visually */
    padding: 0;
    margin: 0;
}

#hue-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    margin-top: -4px;
    /* center thumb on track (depends on height) */
}

#hue-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

#hue-range::-moz-range-track {
    height: 18px;
    border-radius: 9px;
}

#hue-auto {
    white-space: nowrap;
}

.hue-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06) inset;
    display: inline-block;
    flex: 0 0 auto;
}

#hue-value {
    display: inline-block;
    min-width: 1.5rem;
}

.recolor {
    position: relative;
    width: 64px;
    height: 64px;
    overflow: hidden;
    background: var(--icon-mask);
}

.recolor::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--icon-background);
    /* interface hue */
    /* Use mask-mode: luminance so B/W image works as a mask */
    -webkit-mask-image: url("/static/img/icon_mask.png");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-image: url("/static/img/icon_mask.png");
    /* mask-mode: luminance; */
    mask-repeat: no-repeat;
    mask-size: cover;
}

/* background area revealed by inverted mask */
.recolor::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg);
    /* actual page background color */
    -webkit-mask-image: url("/static/img/icon_mask_inv.png");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-image: url("/static/img/icon_mask_inv.png");
    /* mask-mode: luminance; */
    mask-repeat: no-repeat;
    mask-size: cover;
}