/*** All screen sizes ***/
/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #2171f9;
    color: #fff;
    font-family: "Poppins", Helvetica, sans-serif;
    font-weight: 300;
    height: 100%;
    width: 100%;
}

body::after {
    content: '';
    display: block;
    z-index: -1;
    position: fixed;
    top: -120px;
    right: -120px;
    width: 540px;
    aspect-ratio: 1;
    background-color: #edff80;
    mask-image: url("/static/images/login/circle.svg");
    mask-size: cover;
    mask-repeat: no-repeat;
    mask-position: center center;
}

.alert-danger {
    color: red;
}

.alert-danger .errorlist {
    padding: 0;
    list-style: none;
}

.hide-controls[type="number"]::-webkit-outer-spin-button,
.hide-controls[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hide-controls[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.visible-xs {
    display: none;
}

.hidden-xs {
    display: block;
}

/* Left / right division */
.flex-wrapper {
    display: flex;
    width: 100%;
    min-height: 100%;
}

/* Header */
.header {
    min-height: calc(min(32vh, 40vw) - 30px);
}

.header:has(+ .actions-wrapper .safety-information) {
    min-height: unset;
}

.header-text {
    font-size: 50px;
    margin: 0;
}

.sub-header-text {
    font-size: 21px;
    margin-top: 15px;
    margin-bottom: 0;
    display: inline-block;
}

/* Information button and layover */
.info-container {
    position: relative;
    display: inline-block;
    vertical-align: super;
    margin-left: 5px;
}

.info-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #dddddd;
    color: black;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    cursor: pointer;
    font-size: 12px;
}

.info-text {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px;
    border-radius: 5px;
    max-width: 250px;
    width: max-content;
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
}

.info-container:focus-within .info-text,
.info-container:hover .info-text {
    display: block;
}

/* Actions section (left) */
.actions-section {
    width: 50%;
    min-height: 100%;
    padding: 74px 0 42px 140px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.actions-wrapper {
    width: calc(100% - 100px);
}

form {
    margin: 0;
    background: #fff;
    border-radius: 14px;
    padding: 16px 24px 28px;
    font-weight: 400;
}

#twofactor-setup-form .button-wrapper {
    padding-top: 8px;
}

#twofactor-setup-form .errorlist {
    color: red;
    list-style: none;
    padding: 0;
    margin-top: 0;
}

#twofactor-setup-form img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#twofactor-setup-form table {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
    width: 100%;
}

#twofactor-setup-form table th:first-child {
    vertical-align: bottom;
}


#twofactor-setup-form label {
    padding-right: 10px;
    margin-bottom: 20px;
}

/* Form inputs */
label {
    display: block;
    width: 100%;
    color: #000;
    font-size: 14px;
    margin: 15px 0;
}

input {
    width: 100%;
    height: 50px;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    margin: 5px 0;
    background-color: #e8e8e8;
}

/* Form submit buttons */
.button-wrapper {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.button {
    background-color: #edff80;
    color: #2171f9;
    height: 50px;
    padding: 0 15px;
    text-wrap: nowrap;
    flex-grow: 1;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.button-cancel {
    background-color: #ccc;
    color: #000;
}

/* Captcha */
.captcha {
    display: block;
    margin: 0 auto;
}

/* Safety information */
.safety-information {
    color: #000;
    margin-top: 30px;
}

.safety-information p:last-child {
    margin-bottom: 5px;
}

/* Password reset button */
.password-reset {
    margin-top: 20px;
    text-align: center;
}

.password-reset-text {
    font-size: 14px;
    color: #fff;
    text-decoration: none;
}

/* Logo */
.logo-wrapper {
    margin-top: auto;
}

.logo {
    width: 176px;
    margin-left: -98px;
    vertical-align: middle;
}

/* Certification section (right) */
.certified-wrapper {
    width: 50%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 32px 42px 32px 0;
}

/* Certifications */
.certified {
    text-align: center;
    font-size: 14px;
}

.certified-text {
    margin: 0 0 20px;
}

.img-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.icon {
    height: 100px;
}

/*** Tablet ***/
@media only screen and (max-width: 1200px) {
    /* Base */
    body::after {
        width: 440px;
    }

    /* Actions section (left) */
    .actions-section {
        width: 70%;
        padding: 42px 0 42px 42px;
    }

    .logo {
        margin: 0;
    }

    .actions-wrapper {
        width: 100%;
    }
}

/*** Mobile ***/
@media only screen and (max-width: 768px) {
    /* Base */
    body::after {
        width: 100dvw;
        top: unset;
        bottom: -33dvw;
        right: -75dvw;
    }

    .visible-xs {
        display: block;
    }

    .hidden-xs {
        display: hidden;
    }

    /* Left / right division -> top / bottom division */
    .flex-wrapper {
        flex-direction: column;
        min-height: 100%;
        gap: 40px;
        justify-content: space-between;
        padding: 30px;
    }

    /* Header */
    .header {
        min-height: unset;
    }

    .header-text {
        font-size: 30px;
        line-height: 1;
        word-break: break-word;
    }

    .sub-header-text {
        font-size: 15px;
    }

    /* Actions section (bottom) */
    .actions-section {
        width: 100%;
        padding: 0;
        min-height: unset;
        flex-grow: 1;
        gap: min(25px, 3vh);
    }

    .actions-wrapper {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Form submit buttons */
    .button-wrapper {
        flex-direction: column;
    }

    /* Logo */
    .logo-wrapper {
        order: -1;
    }
    
    .logo {
        width: 166px;
    }

    /* Certifications */
    .certified-wrapper {
        padding: 0;
    }

    .certified {
        text-align: left;
    }

    .img-wrapper {
        justify-content: flex-start;
    }

    /* Certifications section (top) */
    .certified-wrapper {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
    }

    /* Specific pages */
    #verify-form .button-wrapper,
    #login-form .button-wrapper {
        flex-direction: column-reverse;
    }
}
