numeric-slider {
    display: block;

    width: 100%;
    height: 100%;

    min-width: 80px;
    min-height: 32px;

    box-sizing: border-box;
}


numeric-slider .numeric-slider-control {
    display: flex;

    width: 100%;
    height: 100%;

    box-sizing: border-box;
}


/*
 * +/- buttons
 *
 * Because width and height are equal,
 * the buttons remain square.
 */
numeric-slider button {
    flex: 0 0 auto;

    height: 100%;
    aspect-ratio: 1 / 1;

    min-width: 32px;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    border: 1px solid #999;

    background: #eeeeee;

    font-size: 1.25em;
    font-weight: bold;

    cursor: pointer;
}


numeric-slider button:hover:not(:disabled) {
    background: #dddddd;
}


numeric-slider button:active:not(:disabled) {
    background: #cccccc;
}


numeric-slider button:disabled {
    opacity: 0.5;

    cursor: default;
}


/*
 * Textbox fills all remaining space.
 */
numeric-slider .numeric-slider-input {
    flex: 1 1 auto;

    width: 0;
    min-width: 0;

    height: 100%;

    margin: 0;
    padding: 0 8px;

    box-sizing: border-box;

    border: 1px solid #999;

    border-left: none;
    border-right: none;

    text-align: center;

    font-size: 1em;
}


numeric-slider .numeric-slider-input:focus {
    outline: none;

    border-color: #666;
}