.form-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    text-align: center;
}

form {
    z-index: 10;
    box-sizing: border-box;

    text-align: center;

    margin: 0 1rem;
    
    border-radius: var(--radius-lg);
    border: var(--border-card);
    border-top: 1px var(--highlight);

    padding: 1rem;

    background-color: color-mix(in srgb, var(--bg-2) 60%, transparent 40%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);

    box-shadow: var(--shadow);
    height: fit-content;
    
}

.form-inputs {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
    margin: 0;
    min-width: 0;
}

.input-wrapper label {
    margin-left: 8px;
}

.input-wrapper input {
    box-sizing: border-box;

    margin: 0 8px;

    background-color: transparent;
    color: var(--text);
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;

    padding: 4px;

}

.input-wrapper input:focus {
    outline: none;
}

.input-wrapper input:is(:-webkit-autofill, :autofill) {
    background-color: var(--text);
}

.grid-pattern {
    display: flex;
    flex-direction: column;

    box-sizing: border-box;

    width: 100%;
    max-width: 100%;

    height: 100vh;

    background-image: 
        linear-gradient(to right, var(--bg-2) 1px, transparent 1px), /* Vertical lines */
        linear-gradient(to bottom, var(--bg-2) 1px, transparent 1px); /* Horizontal lines */
    background-size: 40px 50px; 
}

.side-by-side {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1;
}

.validation-fail {
    text-align: center;
    box-sizing: border-box;

    background-color: color-mix(in srgb, var(--error-bg), transparent);

    border: 1px solid var(--error-border);
    border-radius: var(--radius-sm);

    font-weight: bold;
    margin: 8px 0;
    color: var(--error-text);
    padding: 8px;
}

form input[type="submit"] {

    box-sizing: border-box;
    margin: 0;
    
    border: 1px solid var(--confirm-border);
    border-radius: var(--radius-sm);
    font-weight: bold;

    background-color: color-mix(in srgb, var(--confirm-bg), transparent);    

    padding: 8px;

    color: var(--confirm-text);

    width: 100%;

    transition: all 0.5s linear;
}

form input[type="submit"]:hover {
    background-color: var(--confirm-border);
}

.note {
    color: var(--text-muted);
}

.note a {
    color: var(--theme);
}

@media (min-width: 768px) {
    .form-container {
        justify-content: center;
    }

    .grid-pattern {
        height: 70vh;
        justify-content: center;
        mask-image: linear-gradient(
            to bottom, 
            transparent 0%,    /* Start fully transparent at the very top */
            black 15%,         /* Become fully opaque at 15% down */
            black 85%,         /* Stay opaque until 85% down */
            transparent 100%   /* Become fully transparent at the very bottom */
        );
        /* Include webkit prefix for better compatibility */
        -webkit-mask-image: linear-gradient(
            to bottom, 
            transparent 0%,
            black 15%,
            black 85%,
            transparent 100%
        );
    }

    form {
        margin: 0 auto;
        width: min(600px, 100%);
    }
}