/* static/css/forms.css */

/* Styles for forms and form elements */

.form-container {
    max-width: 600px; /* Limit the width of the form container */
    margin: 2rem auto; /* Center the container and add vertical margin */
    padding: 2rem;
    background-color: var(--white-color); /* White background */
    border-radius: var(--border-radius); /* Rounded corners */
    box-shadow: var(--box-shadow-md); /* Medium shadow */
}

.form-container h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.form-group {
    margin-bottom: 1.5rem; /* Space between form groups */
}

.form-label {
    display: block; /* Make labels block elements */
    margin-bottom: 0.5rem; /* Space below the label */
    font-weight: var(--font-weight-medium);
    color: var(--dark-gray);
}

.form-control {
    display: block; /* Make inputs block elements */
    width: 100%; /* Full width */
    padding: 0.75rem 1rem; /* Padding inside the input */
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: var(--white-color);
    background-clip: padding-box;
    border: 1px solid var(--medium-gray); /* Border color */
    border-radius: var(--border-radius); /* Rounded corners */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    -webkit-appearance: none; /* Remove default browser styling */
    -moz-appearance: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--primary-light); /* Highlight border on focus */
    outline: 0; /* Remove default outline */
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb), 0.25); /* Add a subtle shadow on focus */
}

textarea.form-control {
    min-height: 120px; /* Minimum height for textareas */
    resize: vertical; /* Allow vertical resizing */
}

/* Style for file inputs (basic) */
.form-control-file {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: var(--white-color);
    background-clip: padding-box;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control-file:focus {
    border-color: var(--primary-light);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb), 0.25);
}


/* Style for form buttons */
.form-container .btn {
    margin-top: 1rem; /* Add space above the submit button */
}

/* Style for switch links (e.g., "Don't have an account? Sign Up") */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--dark-gray);
}

.auth-switch a {
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
}

.auth-switch a:hover {
    color: var(--primary-dark);
}



.flash-messages-local {
    margin-bottom: 20px;
}

.flash-messages-local .alert {
    position: relative;
    padding: 12px 18px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.flash-messages-local .alert-success {
    background-color: #28a745;
}

.flash-messages-local .alert-danger {
    background-color: #dc3545;
}

.flash-messages-local .alert-info {
    background-color: #17a2b8;
}

.flash-messages-local .alert-warning {
    background-color: #ffc107;
    color: #212529;
}

.flash-messages-local .alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}


/* Responsive adjustments for forms */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem; /* Reduced padding on smaller screens */
        margin: 1.5rem auto; /* Reduced margin */
    }

    .form-container h2 {
        font-size: 1.8rem; /* Adjusted heading size */
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem; /* Reduced space between groups */
    }

    .form-label {
        font-size: 0.95rem; /* Slightly smaller label font */
    }

    .form-control {
        padding: 0.6rem 0.8rem; /* Reduced input padding */
        font-size: 0.95rem;
    }

    textarea.form-control {
        min-height: 100px; /* Reduced min-height */
    }

    .form-container .btn {
        padding: 0.6rem 1.2rem; /* Adjusted button padding */
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
     .form-container {
        padding: 1rem; /* Further reduced padding */
        margin: 1rem auto; /* Further reduced margin */
    }

    .form-container h2 {
        font-size: 1.5rem; /* Adjusted heading size */
        margin-bottom: 0.8rem;
    }

    .form-group {
        margin-bottom: 0.8rem; /* Further reduced space */
    }

    .form-label {
        font-size: 0.9rem; /* Further reduced label font */
    }

    .form-control {
        padding: 0.5rem 0.6rem; /* Further reduced input padding */
        font-size: 0.9rem;
    }

    textarea.form-control {
        min-height: 80px; /* Further reduced min-height */
    }

    .form-container .btn {
        padding: 0.5rem 1rem; /* Adjusted button padding */
        font-size: 0.85rem;
    }

    .auth-switch {
        margin-top: 1rem;
        font-size: 0.9rem;
    }
}
