/* pubic/css/login.css */

main {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem var(--horizontal-padding);
}

.login-form {
    max-width: 24.3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    padding-bottom: 2rem;
}

.form-header, .form-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form h1 {
    text-align: center;
    margin-top: 0;
}

.login-form p {
    text-align: center;
}

.login-form label {
    width: 100%;
}

.login-form input {
    width: 100%;
}

.code-input {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
    gap: 0.5rem;
}

.code-input .divider {
    width: 0.6rem;
    height: 2px;
    background: var(--color-foreground);
    margin: 0 0.5rem;
}

.code-input input {
    text-align: center;
}

.login-form button {
    width: 100%;
    padding: 0.875rem 1rem;
}

.request-another-code:hover {
    background: var(--color-background-muted);
}

.request-another-code:disabled:hover {
    background: initial;
}

.submit-button {
    background-color: var(--color-link);
    color: var(--color-background);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (orientation: portrait) {
    .code-input .divider {
        margin: 0;
    }
}

/* Wsparcie dla prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
