/* removes the margin causing it not being centered */

.main {
    margin-top: 0;
}


/* Global container */

.global-container {
    /* form */
    --form-bg: #FFFFFF;
    --form-shadow: 0 8px 40px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    /* text */
    --text-title-color: #1a1a1a;
    --text-link-color: #fd5c22;
    --text-subtitle-color: #6b6b6b;
    --text-light-black: #363636;
    --text-color: #000000;
    --text-error: #cd3847;
    --text-success: #1A7F3C;
    /* custom-input */
    --valid-border: #1a7f3c;
    /* button */
    --button-bg: #1a1a1a;
    --button-label: #FFFFFF;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    min-height: calc(100vh - 160px);
    padding: 60px 20px;
    background-color: #f5f0eb;
}


/* Form */

.global-container>form:first-child {
    width: 480px;
    height: fit-content;
    background-color: var(--form-bg);
    padding: 48px 44px;
    border-radius: 12px;
    box-shadow: var(--form-shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}


/* form titles */

.form-header-titles h1 {
    font-weight: 600;
    font-size: 26px;
    line-height: 1.2;
    text-align: center;
    color: var(--text-title-color);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.form-header-titles h2 {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-subtitle-color);
    text-align: center;
    margin-bottom: 0;
}


/* fieldset */

.fieldset-container {
    flex-direction: column;
    display: flex;
}

.fieldset-container label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #3d3d3d;
    letter-spacing: 0.01em;
}


/* custom input */

.custom-input {
    height: 48px;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fafafa !important;
}

.custom-input:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important;
    border-color: #1a1a1a !important;
    background-color: #fff !important;
}


/* password field and toggle icon */

.password-icon-container {
    all: unset;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.password-icon-container:hover {
    opacity: 0.8;
}

.password-icon-container.active .picto-password-invisible {
    display: none;
}

.password-icon-container.active .picto-password-visible {
    display: block;
}

.picto-password-invisible {
    display: block;
}

.picto-password-visible {
    display: none;
}


/* button container */

.button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    margin-bottom: 24px;
    position: relative;
}

.btn-submit {
    all: unset;
    display: inline-block;
    text-align: center;
    width: 100%;
    height: 50px;
    background-color: var(--button-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-submit:hover {
    background-color: #333;
}

.btn-submit:active {
    transform: scale(0.99);
}

.btn-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 50px;
    color: var(--button-label);
    letter-spacing: 0.02em;
}


/* back to login link */

.back-to-login-cont {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.back-to-login-link {
    color: var(--text-link-color) !important;
    text-decoration: underline !important;
    font-size: 14px;
    text-align: center;
}

.back-to-login-link:hover {
    text-decoration: none !important;
}

.input-error-msg {
    display: none;
    color: var(--text-error);
    position: absolute;
    font-weight: 600;
    font-size: 10px;
    left: 1px;
}


/* error message */

.error-container {
    margin-top: 16px;
    margin-bottom: 0;
}

.error-container .error-wrapper {
    border-radius: 8px;
}


/* Smaller device */

@media screen and (max-width: 680px) {
    .global-container {
        padding: 40px 16px;
        min-height: auto;
    }
    .global-container>form:first-child {
        max-width: 480px;
        width: 100%;
        padding: 36px 24px;
    }
    .custom-input {
        height: 44px;
    }
    .custom-input::placeholder {
        font-size: 13px;
    }
}