/**
 * login.css
 * Styles for the Login page (templates/login.html)
 * 
 * This stylesheet provides:
 * - Centered card layout for login form
 * - Logo and branding styling
 * - Form input styling with focus states
 * - Password visibility toggle positioning
 * - Alert message styling (success, danger, info)
 * - "Forgot password" and "Register" link sections
 * - Responsive design for mobile devices
 */

/* ============================================
   BASE RESET & LAYOUT
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #efeae0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Basis Grotesque", Helvetica, Arial, sans-serif;
    padding: 2rem 1rem;
}

/* ============================================
   LOGIN CONTAINER & CARD
   ============================================ */
.login-container {
    max-width: 580px;
    width: 100%;
}

.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
    border: 1px solid #e9ecef;
}

/* ============================================
   LOGO & BRANDING
   ============================================ */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon { /* Has scaling issues on safari so avoid */
    width: 50%;
    height: 50%;
    object-fit: contain;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.logo-svg { /* replacement for .logo-icon class, works fine on safari and chrome now */
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202124;
    margin: 0.5rem 0 0.25rem 0;
}

.logo-subtitle {
    color: #5f6368;
    font-size: 0.875rem;
    font-weight: 400;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-label {
    font-weight: 500;
    color: #202124;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s;
    background-color: #ffffff;
}

.form-control:focus {
    border-color: #8ed5e9;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #80868b;
}

/* ============================================
   PASSWORD FIELD & TOGGLE
   ============================================ */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #202124;
}

/* ============================================
   LOGIN BUTTON
   ============================================ */
.btn-login {
    width: 100%;
    padding: 0.75rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 6px;
    background-color: #8ed5e9;
    border: none;
    color: black;
    transition: all 0.2s;
}

.btn-login:hover {
    background-color: #1a73e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-login:active {
    background-color: #1765cc;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert {
    border-radius: 6px;
    border: none;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.alert-danger {
    background-color: #fce8e6;
    color: #c5221f;
}

.alert-success {
    background-color: #e6f4ea;
    color: #137333;
}

.alert-info {
    background-color: #e8f0fe;
    color: #c5221f;
}

/* ============================================
   BETA NOTE
   ============================================ */
.beta-note {
    background-color: #e8f0fe;
    border: 1px solid #d2e3fc;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #1967d2;
}

.beta-note i {
    color: #4285f4;
    margin-right: 0.5rem;
}

/* ============================================
   SPACING UTILITIES
   ============================================ */
.mb-3 {
    margin-bottom: 1.25rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

/* ============================================
   AUTH LINKS & FORGOT PASSWORD
   ============================================ */
.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.forgot-link {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ============================================
   REGISTER SECTION
   ============================================ */
.register-section {
    margin-top: 1.5rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: #5f6368;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dadce0;
}

.divider span {
    padding: 0 1rem;
}

.register-text {
    text-align: center;
    color: #5f6368;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.btn-register-link {
    width: 100%;
    padding: 0.75rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid #8ed5e9;
    color: #4285f4;
    transition: all 0.2s;
    display: block;
    text-align: center;
    text-decoration: none;
}

.btn-register-link:hover {
    background-color: #e8f0fe;
    color: #8ed5e9;
}
