/* global colors */
:root {
    --primary: #043C5A;
    --primary-faded: #2d143708;
    --primary-lighten-1: #255069;
    --primary-lighten-2: #3C647D;
    --primary-lighten-3: #B2C2CA;
    --primary-lighten-4: #E6EBEF;
    --primary-lighten-hover: #ECF0F3;
    --accent: #9BC83C;
    --accent-faded: #86BA1A;
    --accent-darken-1: #5AA546;
    --accent-hover: #B4D66D;
    --accent-lighten-1: #3BBB83;
    --accent-lighten-2: #85D4B1;
    --accent-lighten-3: #CEEEE0;
    --accent-lighten-4: #E7F7EF;
    --background: #ffffff;
    --text-dark: #5A5A5A;
    --text-light: #ffffff;
    --error: #D28728;
    --error-hover: #D6933D;
    --error-faded: #F8EDDF;
    --success: #9BC83C;
    --bunge-orange: #D28728;
    --bunge-orange-lighten-1: #D6933D;
}

a {
    color: var(--accent) !important;
    text-decoration: underline !important;
}

    a:hover {
        color: var(--accent-hover) !important;
    }

html, body {
    font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    color: var(--primary);
    background: var(--background);
    font-size: 16px;
    padding-top: 20px;
}


.bunge-logo {
    width: 230px;
    margin: 0 0 18px 0;
}

img.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

.btn, input:focus {
    box-shadow: unset !important;
}

.text-muted {
    color: #777
}

.text-hightlighted {
    font-weight: 550;
}

.text-primary {
    color: #337ab7
}

.custom-link {
    color: var(--accent) !important;
    text-decoration: none !important;
}

    .custom-link:hover {
        color: var(--accent-hover) !important;
    }

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 50px var(--primary-lighten-4) inset !important;
    -webkit-text-fill-color: var(--primary);
}

    input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 50px var(--primary-lighten-4) inset !important; /*your box-shadow*/
        -webkit-text-fill-color: var(--primary);
    }


.btn {
    color: var(--primary) !important;
    font-weight: 550 !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    text-transform: none !important;
    min-width: 110px !important;
    text-decoration: none !important;
}

.btn-widened {
    padding: 8px !important;
}


.btn-text.accent {
    color: var(--accent) !important;
}
.btn-text {
    text-transform: none !important;
    min-width: auto !important;
    text-decoration: none !important;
}

    .btn-text:hover {
        cursor: pointer;
        color: var(--accent-hover);
    }


.btn-primary-light {
    color: var(--primary) !important;
    border: 2px solid var(--primary-lighten-4) !important;
    background-color: var(--primary-lighten-4) !important;
}

    .btn-primary-light:hover {
        border: 2px solid var(--primary-lighten-hover) !important;
        background-color: var(--primary-lighten-hover) !important;
    }

.btn-accent {
    color: var(--primary) !important;
    border: 2px solid var(--accent) !important;
    background-color: var(--accent) !important;
}

    .btn-accent:hover {
        border: 2px solid var(--accent-hover) !important;
        background-color: var(--accent-hover) !important;
    }

.password-requirement-icon {
    width: 10px;
}

.login-wrapper {
    margin: 0 auto;
    max-width: 400px;
    width: 100%;
    padding: 35px;
}

.input-label {
    font-size: 0.8em !important;
    margin-bottom: 5px;
    color: var(--primary-lighten-3);
}

.input-field {
    line-height: 1.8em;
    border-radius: 4px !important;
    border-width: 1.5px !important;
    border-color: var(--primary-lighten-3) !important;
}

.form-control::placeholder {
    color: var(--primary-lighten-3);
}

/* Content wrapper */
.content-wrapper {
    /*background-color: var(--background);
    border-radius: 20px;
    padding: 30px;*/
}

.content-title {
    font-size: 1.4rem !important;
    font-weight: 550;
}

.content-subtitle {
    font-size: 1.2rem !important;
    color: var(--accent);
    border-bottom: solid 1px #D5D0D7;
    font-weight: bold;
    margin-bottom: 16px;
}

.application-title {
    font-size: 2.5em !important;
    font-weight: 350;
    margin: 0 0 18px 4px;
}

.content-bottom-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.error-message-wrapper {
    display: flex;
    align-items: center;
    padding: 1em;
    border-radius: 4px;
    width: 100%;
    flex-grow: 1;
    background-color: var(--error-faded);
    gap: 1em;
}

.error-icon {
    color: var(--error);
    font-size: 1.45em;
}

.error-message {
    color: var(--error);
}

.username-help-icon {
    position: absolute;
    right: 0;
    display: inline-block;
    width: 20px;
    height: 20px;
    cursor: pointer;
    background-color: var(--primary);
    border-radius: 30px;
    text-align: center;
    color: var(--text-light);
    font-weight: bold;
}
.username-help-text {
    position: absolute;
    bottom: 23px;
    color: var(--text-light);
    right: 5px;
    padding: 10px;
    border-radius: 5px !important;
    background-color: var(--primary)
}

/* Login Popup */
.popup-background {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0, 0.5);
    z-index: 1000;
    left: 0;
    top: 0;
    display: none;
    justify-content: center;
    align-items: center;
}

.popup-wrapper {
    position: relative;
    background-color: white;
    border-radius: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    flex-grow: 1;
    overflow: hidden;
    animation: fadeIn 0.3s; /* Fade in the popup */
}

/* Content of the popup */
.popup-content {
    display: flex;
    padding: 34px;
    flex-direction: column;
    max-height: 80vh; /* 80% of the viewport height */
    overflow-y: auto; /* Scroll when content exceeds max height */
}

.popup-bottom-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    justify-content: end;
}

.popup-btn-text {
    cursor: pointer;
    color: var(--accent);
}

    .popup-btn-text:hover {
        color: var(--accent-hover);
    }

.popup-header-wrapper {
    font-size: 1.3em !important;
    margin-bottom: 20px;
}

/* Animation for the popup */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* The container */
.container {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    /* Hide the browser's default checkbox */
    .container input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    border: 0.15rem solid var(--accent);
    border-radius: 6px;
}

/* On mouse-over, add a grey background color */
.container:hover input ~ .checkmark {
}

/* When the checkbox is checked, add a background */
.container input:checked ~ .checkmark {
    background-color: var(--accent);
}
    /* When the checkbox is checked, add a background */
    .container input:checked ~ .checkmark:hover {
    }

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.container input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.container .checkmark:after {
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 0.15rem 0.15rem 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

input::-ms-reveal,
input::-ms-clear {
    display: none;
}


.success-validation {
    color: var(--success);
    transition: color 0.2s ease-in-out;
}

.failure-validation {
    color: var(--primary-lighten-3);
    transition: color 0.2s ease-in-out;
}
    .failure-validation.icon {
        color: var(--bunge-orange) !important;
        transition: color 0.2s ease-in-out;
    }    

.password-requirement-wrapper {
    display: flex;
    gap: 6px;
    font-size: 0.8em;
}

.eye-icon-wrapper {
    position: absolute;
    right: 0;
    top: 0;
    padding: 9px;
    cursor: pointer;
}

@media screen and (max-width: 600px) {

    /* Login Popup */
    .popup-background {
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: transparent;
        z-index: 1000;
        left: 0;
        top: 0px;
        display: none;
        justify-content: center;
        align-items: center;
        margin-top: -3px;
    }

    .popup-content {
        display: flex;
        padding: 0 34px 34px 34px;
        flex-direction: column;
        max-height: initial; /* 80% of the viewport height */
        overflow-y: auto; /* Scroll when content exceeds max height */
    }

    .popup-wrapper {
        position: absolute;
        top: 135px;
        background-color: white;
        border-radius: initial;
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: unset;
        flex-grow: 1;
        overflow: scroll;
        animation: unset;
    }
}
