/* General Body and Form Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h2 {
    color: #333;
    border-bottom: 2px solid #5cb85c;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

/* Input and Label Styling */
label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding and border are inside the element's total width and height */
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #5cb85c;
    outline: none;
}

/* Validation Feedback Styling */
/* Red border for invalid, touched inputs */
.ng-invalid.ng-touched {
    border-color: red !important;
}

/* Green border for valid, touched inputs */
.ng-valid.ng-touched {
    border-color: green;
}

.error {
    color: red;
    font-size: 0.85em;
    margin-top: -5px;
    margin-bottom: 10px;
    display: block; /* Ensure the error message takes full width */
}

/* Password Visibility and Strength Indicator */
button[type="button"] {
    padding: 10px 10px;
    margin-right: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.password-strength {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
    margin-left: 5px;
}

.weak {
    background-color: #fcc;
    color: #d9534f;
    border: 1px solid #d9534f;
}

.medium {
    background-color: #ffe0b2;
    color: #f0ad4e;
    border: 1px solid #f0ad4e;
}

.strong {
    background-color: #ccffcc;
    color: #5cb85c;
    border: 1px solid #5cb85c;
}

/* Submit and Reset Buttons */
button[type="submit"],
button[type="button"]:not([ng-click^="togglePasswordVisibility"]) {
    padding: 20px 20px;
    margin-top: 10px;
    margin-left: 50px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

button[type="submit"] {
    background-color: #5cb85c;
    color: white;
    margin-right: 10px;
}

button[type="submit"]:hover:not(:disabled) {
    background-color: #4cae4c;
}

button[type="submit"]:disabled {
    background-color: #a9d4a9;
    cursor: not-allowed;
}

/* Reset Form button styling */
button[ng-click^="resetForm"] {
    background-color: #2b8ce0;
    color: white;
}

button[ng-click^="resetForm"]:hover {
    background-color: #2b8ce0;
}

/* Checkbox styling adjustments */
input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
    vertical-align: middle;
}

label[for="rememberMe"] {
    display: inline;
    font-weight: normal;
}