/* public/css/elogin.css */

/* Base styling for the body and main container */
body {
    background-color: #F3F4F6; /* Light gray background */
    font-family: 'Inter', sans-serif; /* Use the Inter font */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Full viewport height */
    padding: 1rem; /* Add some padding on smaller screens */
}

.container {
    background-color: #ffffff; /* White background for the form container */
    padding: 2.5rem; /* Spacious padding */
    border-radius: 0.75rem; /* rounded-lg */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Soft shadow */
    width: 100%;
    max-width: 450px; /* Max width for desktop forms */
    transition: all 0.3s ease-in-out; /* Smooth transitions for responsiveness */
}

/* Form inputs */
.form-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem; /* py-3 px-4 */
    margin-bottom: 1rem;
    border: 1px solid #D1D5DB; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-md */
    font-size: 1rem;
    line-height: 1.5;
    color: #4B5563; /* text-gray-700 */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: #3B82F6; /* focus:border-blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); /* focus:ring-blue-500 */
}

.form-input::placeholder {
    color: #9CA3AF; /* placeholder-gray-400 */
}

/* Buttons */
.btn {
    display: flex; /* Use flexbox for centering content (like text and spinner) */
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    font-weight: 600; /* font-semibold */
    border-radius: 0.5rem; /* rounded-lg */
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    text-decoration: none; /* For anchor tags acting as buttons */
    white-space: nowrap; /* Prevent text wrapping inside buttons */
}

.btn-primary {
    background-color: #3B82F6; /* bg-blue-500 */
    color: #ffffff; /* text-white */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* shadow-md */
}

.btn-primary:hover {
    background-color: #2563EB; /* hover:bg-blue-600 */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #E5E7EB; /* bg-gray-200 */
    color: #4B5563; /* text-gray-700 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* shadow-sm */
}

.btn-secondary:hover {
    background-color: #D1D5DB; /* hover:bg-gray-300 */
    transform: translateY(-1px); /* Slight lift effect */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem; /* ml-2 */
}

.loading-spinner.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message Box for errors/success */
.message-box {
    padding: 0.75rem 1rem; /* py-3 px-4 */
    border-radius: 0.5rem; /* rounded-md */
    margin-top: 1rem;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25;
}

.message-box.error {
    background-color: #FEE2E2; /* bg-red-100 */
    border: 1px solid #F87171; /* border-red-400 */
    color: #DC2626; /* text-red-700 */
}

.message-box.success {
    background-color: #D1FAE5; /* bg-green-100 */
    border: 1px solid #6EE7B7; /* border-green-400 */
    color: #047857; /* text-green-700 */
}

.message-box.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding: 1.5rem; /* Reduce padding on very small screens */
        border-radius: 0.5rem; /* Slightly less rounded */
    }

    h2 {
        font-size: 2rem; /* Smaller heading on small screens */
    }

    .btn {
        padding: 0.625rem 1rem; /* Smaller button padding */
        font-size: 0.9375rem; /* Slightly smaller font size */
    }
}
