/* Authentication Pages Styling */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure full viewport height */
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 2rem;
}

.auth-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    position: relative; /* For positioning back-to-home link */
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.auth-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-color);
}

.auth-description { /* Styles for descriptive text on auth pages */
    text-align: center;
    margin-bottom: 1.5rem;
    color: #666;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 168, 181, 0.2);
}

.auth-form input.error {
    border-color: #c62828; /* Red border for invalid fields */
}

.error-message {
    color: #c62828;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 1rem; /* Add spacing below "Remember Me" */
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none; /* Prevent text selection */
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    transition: all 0.3s;
}

.checkbox-label input:checked ~ .checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom:after { /* Custom checkmark */
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkbox-custom:after {
    display: block;
}

.form-actions {
    margin-top: 2rem;
}

.form-actions .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.auth-footer p {
    margin: 0.25rem 0;
}

.back-to-home {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.back-to-home a {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.back-to-home a i {
    margin-right: 0.5rem;
}

.back-to-home a:hover {
    color: var(--secondary-color);
}

.success-message { /* Style for success messages on auth pages */
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
    border-left: 4px solid #2e7d32;
}


/* Availability Message Styles (for username/email checks) */
.availability-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block; /* Ensure it takes full width */
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: opacity 0.3s ease; /* Smooth transitions */
}

.availability-message.checking {
    color: #007bff; /* Blue */
    background-color: #e1f5fe;
}

.availability-message.available {
    color: #28a745; /* Green */
    background-color: #e8f5e9;
}

.availability-message.unavailable {
    color: #dc3545; /* Red */
    background-color: #ffebee;
}

.availability-message.error {
    color: #721c24; /* Dark Red */
    background-color: #f8d7da;
}

/* Terms Agreement Checkbox */
.terms-agreement {
    margin-top: 1rem; /* Add spacing above terms */
}


/* Media Queries */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .back-to-home {
        position: static; /* Remove absolute positioning */
        margin-top: 1.5rem;
        text-align: center;
    }
    
    .back-to-home a {
        justify-content: center;
    }
}

