﻿.input-control
{
    display: grid;
    position: relative;
    min-height: 50px;
    width: 90%;
    max-width: 400px;
    place-items: center;
    margin: 16px auto;
    z-index: 1;
}

.input-control .border {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 400px;
    width: 100%;
    z-index: -1;
    aspect-ratio: 8 / 1;
}

.input-control .border .border-line
{
    fill: none;
    stroke: #ddd;
    stroke-width: 2px;
}


.input-control .label {
    position: absolute;
    top: -0.6em;
    left: 16px;
    color: #888;
    font-size: 0.9em;
    user-select: none;
}

/* Disable autofill highlighting */
input:-webkit-autofill
{
    -webkit-text-fill-color: #000 !important;
    -webkit-box-shadow: 0 0 0 1rem transparent inset !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.input-control .text-input
{
    width: 100%;
    height: 100%;
    padding: 0 5%;
    border-radius: 4px;
    color: #000;
    background: transparent;
}

.input-control .text-input[type="date"]
{
    height: auto;
}

.input-control .text-input:focus ~ .border .border-line
{
    stroke: #aaa;
}

.input-control .text-input:focus ~ .label
{
    font-weight: 600;
    color: #111;
}
