:root {
    --color1: lightblue;
    --color2: lightgrey;
    --black: black;
}

input, textarea, select {
    outline: none;
    background: none;
    border: none;
    resize: none;
    color: var(--black);
}

/*https://stackoverflow.com/questions/28686288/remove-default-text-placeholder-present-in-html5-input-element-of-type-date*/

input[type=date]:required:invalid::-webkit-datetime-edit {
    color: transparent;
}

input[type=date]:focus::-webkit-datetime-edit {
    color: black !important;
}

.pb-input {
    position: relative;
    height: 50px;
}


.pb-input label {
    position: absolute;
    left: 5px;
    top: 20px;
    font-size: 12pt;
    transition: 0.3s;
    pointer-events: none;
}

.pb-input input {
    position: absolute;
    top: 20px;
    left: 0;
    font-size: 14pt;
    right: 0;
    width: 100%;
    height: 30px;
    padding-left: 5px;
    border-bottom: 1px solid lightgray;
}

.pb-input input:valid {
    border-bottom: 3px solid var(--color1);
}



.pb-input input:focus + label,
.pb-input input:valid + label {
    left: 5px;
    top: 5px;
    font-size: 10pt;
}

.pb-input::after {
    content: '';
    position: absolute;
    border-bottom: 3px solid var(--color1);
    left: 0;
    bottom: 0;
    right: 100%;
    transition: 0.3s;
    z-index: 2;
}

.pb-input:focus-within::after {
    position: absolute;
    border-bottom: 3px solid var(--color1);
    right: 0;
}


.pb-textarea {
    position: relative;
    height: 100px;
}


.pb-textarea label {
    position: absolute;
    left: 5px;
    top: 20px;
    font-size: 12pt;
    transition: 0.3s;
    pointer-events: none;
}

.pb-textarea textarea {
    position: absolute;
    top: 20px;
    left: 0;
    font-size: 14pt;
    right: 0;
    width: 100%;
    height: 80px;
    padding-left: 5px;
    border-bottom: 1px solid lightgray;
}

.pb-textarea textarea:valid {
    border-bottom: 3px solid var(--color1);
}

.pb-textarea textarea:focus + label,
.pb-textarea textarea:valid + label {
    left: 5px;
    top: 5px;
    font-size: 10pt;
}

.pb-textarea::after {
    content: '';
    position: absolute;
    border-bottom: 3px solid var(--color1);
    left: 0;
    bottom: 0;
    right: 100%;
    transition: 0.3s;
    z-index: 2;
}

.pb-textarea:focus-within::after {
    position: absolute;
    border-bottom: 3px solid var(--color1);
    right: 0;
}


.pb-select {
    position: relative;
    height: 50px;
}


.pb-select label {
    position: absolute;
    left: 5px;
    top: 20px;
    font-size: 12pt;
    transition: 0.3s;
    pointer-events: none;
}

.pb-select select {
    position: absolute;
    top: 20px;
    left: 0;
    font-size: 14pt;
    right: 0;
    width: 100%;
    height: 30px;
    border-bottom: 1px solid lightgray;
}

.pb-select select:valid {
    border-bottom: 3px solid var(--color1);
}

.pb-select select:focus + label,
.pb-select select:valid + label {
    left: 5px;
    top: 5px;
    font-size: 10pt;
}

.pb-select::after {
    content: '';
    position: absolute;
    border-bottom: 3px solid var(--color1);
    left: 0;
    bottom: 0;
    right: 100%;
    transition: 0.3s;
    z-index: 2;
}

.pb-select:focus-within::after {
    position: absolute;
    border-bottom: 3px solid var(--color1);
    right: 0;
}


.pb-switch {
    height: 50px;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.pb-switch .switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 30px;
}

.pb-switch .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pb-switch .switch span {
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color2);
    -webkit-transition: .3s;
    transition: .3s;
    border-radius: 30px;
}

.pb-switch .switch span::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 3px;
    border-radius: 50%;
    background-color: white;
    -webkit-transition: .3s;
    transition: .4s;
}

.pb-switch .switch input:checked + span {
    background-color: #2196F3;
}

.pb-switch .switch input:checked + span::before {
    -webkit-transform: translateX(13px);
    -ms-transform: translateX(13px);
    transform: translateX(13px);
}

.pb-switch .label {
    display: flex;
    width: calc(100% - 50px);
    flex-direction: column;
    justify-content: center;
    padding-left: 5px;
    font-size: 12pt;
}



.search-box {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5;
    background-color: white;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

.search-box-item {
    cursor: pointer;
    padding: 1em 0.5em;
}

.search-box-item:hover {
    background-color: lightgray;
}

.search-box-item p {
    margin-bottom: 0;
}


.range-selector {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5;
    background-color: white;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

.button {
    overflow: hidden;
    position: relative;
    height: 50px;
    width: 100px;
    backface-visibility: hidden;
}

.button:hover .ripples {
    background-color: rgba(0,0,0, 0.1);
}

.button:focus .ripples {
    background-color: rgba(0,0,0, 0.3);
}



.button label {
    pointer-events: all;
    text-transform: uppercase;
    padding: 0.5em;
    cursor: pointer;
    width: 100px;
    display: flex;
    text-align: center;
    flex-direction: column;
    height: 50px;
    position: absolute;
    top: 0;
    left: 0;
}

.button .border {
    border: 1px solid black;
}

.button label p, i {
    margin: auto;
}


.button-sm {
    width: 50px;
}

.button-sm label {
    width: 50px;
}


.ripples {
    pointer-events: none;
    position: absolute;
    clip: rect(0,100px,50px,0);
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.button-sm .ripples {
    clip: rect(0,50px,50px,0);
}

.ripple {
    position: fixed;
    background-color: black;
    border-radius: 50%;
    transition: 0.3s;
    width: 200px;
    height: 200px;
    opacity: 0;
    animation-name: ripple-fx;
    animation-duration: 0.3s;
    pointer-events: none;
    cursor: pointer;
}

@keyframes ripple-fx {
    from {
        transform: scale(0);
        opacity: 0.3;
    }

    to {
        transform: scale(1);
        opacity: 0;
    }
}


.t-h th {
    min-width: 50px;
}