@font-face {
    font-family: "Snaga Regular";
    src: url("fonts/SnagaDisplay-Regular.woff2") format("woff2");
}
@font-face {
    font-family: "Snaga Medium";
    src: url("fonts/SnagaDisplay-Medium.woff2") format("woff2");
}
@font-face {
    font-family: "Snaga Semibold";
    src: url("fonts/SnagaDisplay-Semibold.woff2") format("woff2");
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    background-color: #F6F5FF;
    padding: 20px 20px 90px;
}

.centered-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    position: relative;
}

form, .form-signin {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 400px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 5px;
    margin-bottom: 32px;
}

.back-button {
    position: absolute;
    left: 0;
    background: none;
    border: none;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    z-index: 1;
    transition: opacity 0.2s ease;
    outline: none;
    box-shadow: none;
}

.back-button:active {
    opacity: 0.4;
    border: none;
    outline: none;
    box-shadow: none;
}

.back-button:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

.back-button i {
    font-size: 20px;
    color: #0C005F;
}

.title {
    font-family: "Snaga Semibold", sans-serif;
    color: #0C005F;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    margin-bottom: 0;
}

.text {
    font-family: "Snaga Regular", sans-serif;
    color: #767575;
    font-size: 1rem;
    line-height: 1.5rem;
    text-align: center;
    margin-bottom: 0;
}

.language-switch {
    position: absolute;
    right: 0;
    top: -10px;
    z-index: 1;
}

label {
    font-family: "Snaga Medium", sans-serif;
    color: #7F7F7F;
    font-size: 0.9rem;
    line-height: 17px;
    text-align: left;
    margin-bottom: 8px;
}

input {
    border-radius: 8px !important;
    border: none !important;
    background-color: white !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.password-input {
    padding-right: 35px;
    margin-bottom: 12px;
}

.main-button {
    font-family: "Snaga Semibold", sans-serif;
    background: #0C005F;
    color: white;
    border-radius: 100px;
    font-size: 14px;
    padding: 7px 16px;
    margin-top: 50px;
    transition: opacity 0.2s ease;
    border: none;
    box-shadow: none;
}

.main-button:hover,
.main-button:focus {
    background: #0C005F;
    color: white;
    border: none;
    box-shadow: none;
    outline: none;
}

.main-button:active {
    opacity: 0.4;
    background: #0C005F;
    color: white;
    border: none;
    box-shadow: none;
}

.secondary-button {
    font-family: "Snaga Semibold", sans-serif;
    background: #F6F5FF;
    color: #0C005F;
    border-width: 1px;
    border-color: #0C005F;
    border-radius: 100px;
    border-style: solid;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    padding: 7px 16px;
    margin-top: 12px;
    transition: opacity 0.2s ease;
    box-shadow: none;
}

.secondary-button:hover,
.secondary-button:focus {
    background: #F6F5FF;
    color: #0C005F;
    border: 1px solid #0C005F;
    box-shadow: none;
    outline: none;
}

.secondary-button:active {
    opacity: 0.2;
    background: #F6F5FF;
    color: #0C005F;
    border: 1px solid #0C005F;
    box-shadow: none;
}

.message {
    font-family: "Snaga Regular", sans-serif;
    margin-top: 24px;
}

.password-container {
    position: relative;
}

.password-container .form-control {
    font-size: 16px;
    padding-right: 35px;
    border: none;
    box-shadow: none;
    background-color: #F2F1F9;
    margin-bottom: 0;
}

.form-control:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.disabled-input {
    color: #bfbfbf;
}

.eye-icon {
    position: absolute;
    top: 3px;
    right: 2px;
    z-index: 2;
    padding: 5px 10px;
}

/* Prevent iOS zoom on focus */
@media screen and (max-width: 480px) {
    input {
        font-size: 16px;
    }
}

.error {
    color: #EF4580;
    font-size: 0.8rem;
    margin-top: 0.2rem;
    display: none;
    line-height: 1rem;
}

.error.password-hint,
.error.email-hint {
    color: #9CA3AF;
    display: block;
}

.error.password-hint.invalid {
    color: #EF4580;
}

/* Show errors when form is submitted and field is invalid */
.form-submitted input:invalid + .error {
    display: block;
}

/* Show password error when focused and invalid */
.show-error .error {
    display: block;
}

/* Make password input border red when focused and invalid */
.show-error .password-container .form-control,
.show-error input.form-control {
    border: 1px solid #EF4580 !important;
}

.email-error {
    color: #EF4580;
    font-size: 0.8rem;
    margin-top: -0.4rem;
    display: none;
    line-height: 1rem;
}

.form-group {
    margin-bottom: 12px;
}

.form-submitted input:invalid {
    border: 1px solid #EF4580 !important;
}

.form-submitted input[id="confirm-password"]:invalid:not(.passwords-mismatch) {
    border: none !important;
}

.form-submitted input[id="confirm-password"].passwords-mismatch {
    border: 1px solid #EF4580 !important;
}

.btn-primary {
    background-color: #2563EB;
    color: white;
}

.btn-primary:active {
    background-color: #1D4ED8;
}

.btn-secondary {
    background-color: #9CA3AF;
    color: white;
}

.btn-secondary:active {
    background-color: #6B7280;
}

.optional {
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: normal;
}

.separator {
    height: 1px;
    width: 100%;
    background-color: #CCC;
    margin: 50px 0;
}

a {
    text-decoration: none;
}

.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    background: #F6F5FF;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #231f7c;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 40px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.redirect-link {
    font-size: 0.8em;
    color: #666;
    margin-top: 30px;
}
