@font-face {
    font-family: Roboto;
    src: url("../font/Roboto-Regular.ttf");
}


body {
    margin: 0;
    font-family: "Roboto", Helvetica;

    background-image: url("../img/background-lg.jpg"), url("../img/background-sm.jpg");
    background-size: cover, cover;
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 100vh;

}

form, .view {
    background-color: rgba(255, 255, 255, 0.8);

    margin: 50px 0;
    border: 3px solid gray;
    border-radius: 10px;
    padding: 20px;
    width: clamp(500px, 80%, 1000px);
}

button {
    transition: 0.5s;
    font-size: 1.3rem;
    border: none;
    padding: 10px;
    margin: 20px;
    background: #993333;
    border-radius: 5px;
    color: white;
}

button:hover {
    background: #551100;
}

h2 {
    margin: 40px 20px 20px 20px;
    border-bottom: 3px solid black;
    padding-left: 10px;
}

label {
    color: white;
    background: #993333;
    border-radius: 5px 5px 0 0;
    padding: 5px 10px;

    white-space: nowrap;
}

label::after {
    content: ": ";
}

input, select {
    transition: 100ms;

    padding: 7px;
    border: 2px solid #993333;
    border-radius: 0 0 5px 5px;
}

input:focus, select:focus {
    outline: none;
}
input:required:focus:valid {
  background: url("../img/ok.svg") no-repeat 95% 50% lightgray;
  background-size: 20px;
}
input:focus:invalid {
  background: url("../img/error.svg") no-repeat 95% 50% lightgray;
  background-size: 20px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

textarea {
  resize: none;
  height: 5rem;
}

.block {
    display: flex;
    flex-direction: row;
    align-content: stretch;
    justify-content: center;
    margin: 20px 10px;
}
.block2 {
    display: flex;
    flex-direction: row;
    align-content: stretch;
    justify-content: left;
    margin: 20px 10px;
}


.field {
    display: flex;
    flex-direction: column;
    margin: 0 10px;
    flex: 1;
}


.conditional {
    flex-direction: column;
    flex-wrap: wrap;
    background-color: #993333;
    border-radius: 5px 5px;
    padding: 7px;
}


.conditional .hide input {
    border-radius: 5px;
}

.conditional .hide .field label {
    padding-bottom: 0;
}

.condition-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.condition-header select {
    min-width: 410px;
    padding: 5px;
    border-radius: 5px;
}

/*
.conditional input[type="checkbox"]:checked + .hide {
    display: block;
}*/

.hide {
    margin: 10px 0;
    display: none;
}

.single {
    flex: 0;
}

.button {
    transition: 500ms;
    display: inline-block;
    padding: 20px;
    margin: 10px;
    background: #993333;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    text-decoration: none;
}
.button:hover {
    background: #551100
}
