@font-face {
    font-family: 'Aptos';
    src: url('Aptos.woff2') format('woff2'),
        url('Aptos.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    --main-color: #466ab8;
    --text-color: #4a4a4a;
    margin: 0.5rem;
    font-family: 'Aptos';
}

.file-label {
    align-items: stretch;
    display: flex;
    cursor: pointer;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
    padding-left: 0.5em;
    font-size: medium;
}

.file-input {
    position: absolute;
    opacity: 0;
}

.file-cta {
    background-color: #f5f5f5;
    color: #4a4a4a;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-radius: 10px 0 0 10px;
}

.file-cta,
.file-name {
    border-color: #dbdbdb;
    font-size: 1em;
    padding: 0.5em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.file-name {
    border-color: #dbdbdb;
    border-style: solid;
    border-width: 1px 1px 1px 0;
    display: block;
    border-radius: 0 15px 15px 0;
    text-decoration: none;
    color: var(--main-color);
}

form {
    display: flex;
    flex-direction: column;
}

h2,
h1 {
    color: var(--main-color);
    text-align: center;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
    padding: 0px;
    margin: 0px;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

button {
    background-color: var(--main-color);
    color: #FFFFFF;
    border: 1px solid var(--main-color);
    border-radius: 2lh;
    box-shadow: none;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 200ms;
}

button:hover {
    background-color: #FFFFFF;
    color: var(--main-color);
    box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.3);
}

.btn-suppr {
    padding-right: 1rem;
    padding-left: 1rem;
    background-color: rgb(243, 89, 89);
    font-size: medium;
}

.btn-add {
    font-size: large;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-top: 1.2rem;
}

.btn-save,
.btn-send {
    width: 90%;
    max-width: 300px;
    min-width: fit-content;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    border-color: #FFFFFF;
    transition: background-color 200ms;
    margin: 5%;
    align-self: center;
}

.btn-cancel {
    color: grey;
}

.container-collection,
.container {
    border-top: solid 0.5px;
    border-color: #5383eb;
    background-color: #FFFFFF;
    margin: 1%;
    padding: 1%;
    display: flex;
    flex-direction: column;
}

.singleBox div,
.doubleBox div,
.fields div,
.fields-foreign > div,
.collection div[id^="candidate_"] div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fields,
.fields-lastFunction,
.fields-info,
.collection > div[id^="candidate_"],
.collection > div > div[id^="candidate_"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2%;
    column-gap: 3rem;
    padding-top: 30px;
}

.fields-foreign,
.column {
    display: flex;
    gap: 1rem;
    padding-top: 20px;
    flex-wrap: wrap;
}

.column {
    flex-direction: column;
}

.column .singleBox > div {
    align-items: start;
}

.title,
.btn-add {
    align-self: center;
}

.fileSelect {
    flex-wrap: wrap;
    align-items: center;
}

button,
p,
.file-name {
    font-weight: 600;
}

div > label,
p {
    font-size: large;
    color: var(--text-color);
}

.align-center {
    text-align: center;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px;
}

.div-btn {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.div-btn {
    display: flex;
    justify-content: space-around;
}

input,
textarea {
    margin-left: 0.5rem;
}

.hidden {
    display: none !important;
}

.wrong {
    color: rgb(224, 73, 73);
    border-color: rgb(224, 73, 73);
}

form[name="function"] {
    margin-top: 2em;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1em;
}

form[name="function"] > div {
    grid-column: 2/3;
    display: flex;
    flex-direction: column;
}

.selectDiv {
    position: relative;
    width: 160px;
}

input:not([type="radio"], [type="file"]),
textarea {
    all: unset;
    border: 1px solid var(--main-color);
    border-radius: 4px;
    margin-left: 1em;
    padding-block: 0.25rem;
    padding-inline: 0.5rem;
}

input:not([type="radio"], [type="file"], [type="date"]),
select {
    height: 1.30em;
}

input:not([type="radio"], [type="file"], [type="date"], .number) {
    width: 70% !important;
}

.container label,
.container-collection label {
    max-width: 65%;
}

textarea {
    resize: both;
}

.fields-info .column:last-child .singleBox div {
    justify-content: start;
}

input:not([type="radio"], [type="file"]):focus-visible,
textarea:focus-visible,
.select:focus-visible {
    border-color: #485fc7;
    box-shadow: 0 0 0 .2em rgba(72, 95, 199, .25);
}

.select:focus-visible {
    outline: none;
}

.selectFn {
    all: unset;
    width: 150px;
    margin: 1em;
    margin-left: 0;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 4px;
    border-color: var(--main-color);
    height: 1.35em;
    justify-content: flex-start;
    line-height: 1.5;
    padding-bottom: .5em;
    padding-left: .75em;
    padding-right: .75em;
    padding-top: .3em;
    position: relative;
    cursor: pointer;
    display: block;
    font-size: 1.125em;
    max-width: 100%;
}

.selectFn option {
    color: black;
}

.select {
    width: 174px;
    position: relative;
    cursor: pointer;
    display: block;
    border: 1px solid transparent;
    border-radius: 4px;
    border-color: var(--main-color);
    padding-block: 0.25rem;
    padding-inline: 0.5rem;
    height: 22.8px;
}

.selectDiv::after {
    border: 3px solid transparent;
    border-radius: 2px;
    border-right: 0;
    border-top: 0;
    border-color: #485fc7;
    right: 0;
    z-index: 4;
    content: " ";
    display: block;
    height: .550em;
    margin-top: -.4375em;
    pointer-events: none;
    top: 47%;
    transform: rotate(-45deg);
    transform-origin: center;
    width: .550em;
    position: absolute;
}

.field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.justify-end {
    justify-content: flex-end !important;
}

.missing {
    border-color: rgb(224, 73, 73) !important;
}

input[readonly="readonly"] {
    border: none !important;
}

.singleBox {
    width: 100%;
}

div[id^="candidate_languages_"] {
    display: flex !important;
    flex-wrap: wrap;
}

.success {
    text-align: center;
}

.success-warning {
    padding-top: 30px;
}

@media (min-width: 800px) {

    div[id^="candidate_studies_"] div:nth-last-child(3),
    .fields-info .column:last-child,
    .fields-lastFunction .column:last-child {
        grid-column: span 2;
    }

    textarea {
        width: 30em;
        height: 5em;
    }
}

@media (max-width: 500px) {
    .file-cta {
        border-width: 1px;
        border-radius: 10px;
    }

    .file-name {
        border-width: 1px;
        border-radius: 15px;
    }

    .container-collection,
    .container {
        padding: 3%;
    }

    .fields,
    .fields-lastFunction,
    .fields-info,
    .collection > div[id^="candidate_"],
    .collection > div > div[id^="candidate_"] {
        row-gap: 0;
    }
}

@media (max-width: 350px) {

    .singleBox > div,
    .doubleBox div,
    .fields div,
    .collection div[id^="candidate_"] div {
        flex-wrap: wrap;
        column-gap: 15rem;
    }

    .fields,
    .fields-info,
    .collection>div[id^="candidate_"],
    .collection>div>div[id^="candidate_"] {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}