@import url('./variables.css');

body {
    margin: 0;
    background-color: var(--widget-background);
    font-family: 'League Spartan', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

input::-ms-clear,
input::-ms-reveal {
display: none;
width: 0;
height: 0;
}

/* Grįžimo mygtuko konteineris */
.back-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: -2rem;
    margin-bottom: 1rem;
}

/* Pats grįžimo mygtukas */
.back-link {
    font-weight: bold;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
}

/* Registracijos kortelė */
.register-container {
    background-color: var(--background);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Logo */
.logo {
    font-weight: bold;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    letter-spacing: -3px;
}
.logo span {
    color: var(--text-color);
}

/* Antraštė „Registracija“ */
.subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* Klaidos prane6imas */
.error-message {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.password-field,
.text-field {
    position: relative;
    margin-bottom: 1.2rem;
}

.password-field input,
.text-field input {
    width: 95%;
    padding: 0.75rem;
    border: none;
    background-color: var(--widget-background);
    font-size: 1.2rem;
    color: var(--text-color);
    font-family: 'League Spartan', sans-serif;
}

.eye-btn {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.eye-btn.show {
    opacity: 1;
    pointer-events: auto;
}

input:-webkit-autofill {
    -webkit-text-fill-color: var(--text-color) !important;
    font-family: 'League Spartan', sans-serif !important;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: 0 0 0px 1000px var(--widget-background) inset;
}

.password-requirements {
    text-align: left;
    margin-bottom: 1rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.password-requirements.show {
    max-height: 200px;
    opacity: 1;
}
.password-requirements p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.valid {
    color: var(--success-color);
}
.invalid {
    color: var(--error-color);
}

/* Registracijos mygtukas */
.register-btn {
    background-color: var(--text-color);
    color: var(--background);
    border: none;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.2s ease-in-out;
}
.register-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.register-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Prisijungimo kvietimas */
.login-section {
    font-size: 1rem;
    color: var(--border-color);
}
.login-section a {
    display: inline-block;
    background-color: var(--widget-background);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    margin-top: 0.5rem;
}
.login-section a:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

@media screen and (max-width: 480px) {
    body {
        padding: 2rem 1rem;
        height: auto;
        justify-content: flex-start;
    }

    .register-container {
        padding: 1.5rem;
        border-radius: 1rem;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
        width: 85%;
    }

    .logo {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-top: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .password-field input,
    .text-field input {
        font-size: 1rem;
        width: 90%;
        padding: 0.75rem;
    }

    .eye-btn {
        font-size: 1rem;
        right: 0.5rem;
    }

    .register-btn {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .back-link {
        font-size: 0.9rem;
    }

    .error-message {
        font-size: 0.95rem;
        padding: 0.5rem 0;
    }

    .password-requirements p {
        font-size: 0.85rem;
    }

    .login-section {
        font-size: 0.9rem;
        text-align: center;
    }

    .login-section a {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .back-wrapper{
        margin-top:1rem;
    }
}
