div.form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    padding: 0 15px; /* Add horizontal padding for mobile */
}

/* Container for the form */
div.form-container {
    background-color: white;
    border: 1px solid #E6E6E6; /* Thin border around the box */
    border-radius: 5px;
    padding: 20px; /* Add padding inside the container */
    box-sizing: border-box; /* Include padding in width calculations */
}

div.center {
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 50px;
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
    div.center {
        max-width: 90%; /* Use percentage instead of fixed pixels */
        padding-top: 30px;
    }
    
    div.form-container {
        padding: 15px; /* Reduce padding on mobile */
        margin: 0 10px; /* Add margin for breathing room */
    }
    
    div.form {
        padding: 0 10px; /* Reduce outer padding on mobile */
    }
}

span.flex-fill {
 border-top: 1px solid #dee2e6 !important;
 flex: 1 1 auto;
 width: auto;
}

/* Headings */
.form h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Form elements */
form p {
    margin-bottom: 15px;
}

form label {
    font-weight: 600;
    color: #333;
}

form input[type="text"],
form input[type="password"] {
    width: 100%;
    max-width: 100%; /* Prevent inputs from exceeding container */
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in width */
}

/* Additional mobile-specific input styling */
@media (max-width: 480px) {
    form input[type="text"],
    form input[type="password"] {
        padding: 12px 10px; /* Slightly larger padding for touch */
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Styling for text input when focused */
form input[type="text"]:focus,
input[type="password"]:focus {
    border: 3px solid lightblue;
    border-color: lightblue; /* Light blue border color when focused */
    outline: none; /* Remove default outline */
}

form input[type="text"]::placeholder,
form input[type="password"]::placeholder {
    color: #888;
    font-style: italic;
}

form input[type="checkbox"] {
    margin-right: 5px;
}

form input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: var(--viu-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    box-sizing: border-box; /* Include padding in width */
}

form input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Alert messages */
.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-info {
    background-color: #e7f3fe;
    color: #31708f;
    border: 1px solid #bce8f1;
}

.alert-danger {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Error messages */
span.form-error {
    color: red;
    font-size: 0.9em;
}

p.form-comment {
    margin: 0;
    margin-top: -12px;
}
