/* ====================================
Learnify SHARED FORM STYLES (forms.css)
Applies to both login and registration forms.
==================================== */

/* --- Form Body & Container --- */
body {
    font-family: "Poppins", sans-serif;
    /* Styles needed for form centering, shared by both login and register */
    background-color: #0f172a;
    color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center; /* Centering the form */
    min-height: 100vh; 
    margin: 0;
    /* registration form had padding-top: 2rem; - Login form had height: 100vh.
    Using min-height 100vh and align-items: center ensures vertical centering 
    while allowing content overflow on smaller screens. */
}

.form-container {
    background-color: #1e293b;
    padding: 1.5rem 2rem; 
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
    max-width: 440px;
    width: 90%;
    margin: 2rem auto;
}

/* --- Logo and Titles --- */
.form-logo {
    display: flex; /* Using flex for centering consistency */
    justify-content: center;
    align-items: center;
    margin-bottom: 0.6rem; 
}
.form-logo .logo-img {
    max-width: 90px; 
    height: auto;
    object-fit: contain;
}

/* --- Visual Cues for Clickable Logo --- */
.form-logo a {
    /* Ensures the entire logo area is recognized as a pointer target */
    display: inline-block; 
    text-decoration: none;
    line-height: 0; /* Prevents unwanted space below the image */
}

.form-logo a:hover {
    /* Subtle change to indicate interaction */
    opacity: 0.85; 
}

.form-logo a:hover .logo-img {
    /* Change the cursor when hovering over the logo image */
    cursor: pointer; 
}

h2 {
    color: #14b8a6;
    font-size: 1.55rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0;         
    margin-bottom: 0.2rem; 
}
.subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
}

/* --- Inputs and Groups --- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;          
    margin-bottom: 0.6rem; 
}

.input-group label,
label { /* Target the generic label style from login.css */
    font-weight: 500;
    margin-bottom: 0.15rem; 
    color: #e2e8f0;
    font-size: 0.9rem;
    display: block;
}

.input-group input,
.input-group select,
.input-group textarea,
input { /* Target generic input style from login.css */
    width: 100%;
    padding: 0.7rem 0.9rem; 
    border-radius: 8px;
    border: 1px solid #334155;
    background-color: #0f172a;
    color: #f8fafc;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    appearance: none;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 5px #14b8a6;
}

/* --- Buttons --- */
.btn {
    background-color: #14b8a6;
    color: white;
    border: none;
    padding: 0.7rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}
.btn:hover {
    background-color: #0d9488;
}

/* --- Links --- */
.login-link,
.register-link {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.2rem; 
}
.login-link a,
.register-link a {
    color: #14b8a6;
    text-decoration: none;
}
.login-link a:hover,
.register-link a:hover {
    text-decoration: underline;
}

/* --- Messages/Alerts --- */
.message, .message-box {
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}
.message.success, .message-box.success {
    background-color: #065f46;
    color: #d1fae5;
    border: 1px solid #10b981;
}
.message.error, .message-box.error {
    background-color: #7f1d1d;
    color: #fee2e2;
    border: 1px solid #ef4444;
}

/* === Password Wrapper (Shared for Login & Register) === */
.password-group,
.password-wrapper {
    width: 100%;
}

.password-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 1.8rem; /* make space for the eye icon */
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #14b8a6;
}

/* --- Media Query --- */
@media (max-width: 768px) {
    .form-container {
        width: 90%;
        padding: 1.5rem;
    }
}