/**
 * Enhanced Login Page - Business Mentors
 * Uses theme CSS variables for consistency
 * NO hardcoded colors - all from theme-config.css
 */

/* ========================================
 * Page Layout & Structure
 * ======================================== */

/* Only apply to login page body */
body.login-page {
    overflow: hidden;
}

.bm-login-container {
    display: flex;
    min-height: 100vh;
}

/* ========================================
 * Brand Section (Left Side)
 * ======================================== */

.bm-login-brand {
    flex: 0 0 50%;
    position: relative;
    background: var(--gradient-primary); /* Official theme gradient */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    overflow: hidden;
}

.bm-brand-content {
    position: relative;
    z-index: 3;
    color: var(--color-white);
    max-width: 500px;
}

.bm-brand-logo {
    margin-bottom: var(--space-8);
}

.bm-logo-img {
    max-width: 200px !important;
    height: auto !important;
    display: block !important;
}

.bm-brand-title {
    font-family: var(--font-heading); /* Parkinsans */
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-6);
    color: var(--color-white);
}

.bm-brand-description {
    font-family: var(--font-body); /* Lato */
    font-size: var(--text-lg);
    line-height: 1.75;
    margin-bottom: var(--space-8);
    color: var(--color-white);
    opacity: 0.95;
}

/* ========================================
 * Decorative Elements
 * ======================================== */

.bm-brand-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
}

.bm-circle {
    position: absolute;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s ease-in-out infinite;
}

.bm-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bm-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.bm-circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 20%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ========================================
 * Form Section (Right Side)
 * ======================================== */

.bm-login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    background: var(--color-white);
}

.bm-login-form {
    width: 100%;
    max-width: 450px;
}

.bm-form-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.bm-form-title {
    font-family: var(--font-heading); /* Parkinsans */
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-dark);
    margin-bottom: var(--space-2);
}

.bm-form-subtitle {
    font-family: var(--font-body); /* Lato */
    font-size: var(--text-base);
    color: var(--color-gray-600);
}

/* ========================================
 * Form Elements
 * ======================================== */

.bm-form-group {
    margin-bottom: var(--space-6);
}

.bm-form-label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin-bottom: var(--space-2);
}

.bm-input-container {
    position: relative;
}

.bm-form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    padding-left: var(--space-12); /* Space for icon */
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-dark);
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.bm-form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(230, 27, 65, 0.1);
}

.bm-form-control.is-invalid {
    border-color: var(--color-error);
}

.bm-input-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-400);
    font-size: var(--text-base);
}

.bm-form-control:focus + .bm-input-icon {
    color: var(--color-primary);
}

.bm-error-message {
    display: block;
    margin-top: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-error);
}

/* ========================================
 * Form Options
 * ======================================== */

.bm-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.bm-remember {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.bm-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.bm-checkbox-label {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-gray-700);
    cursor: pointer;
}

.bm-forgot-password,
.bm-forgot-link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-base);
}

.bm-forgot-password:hover,
.bm-forgot-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ========================================
 * Buttons
 * ======================================== */

.bm-btn-primary {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-family: var(--font-heading); /* Parkinsans */
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    background: var(--gradient-primary); /* Official gradient */
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.bm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.bm-btn-primary:active {
    transform: translateY(0);
}

/* Login button - same as primary button */
.bm-login-button {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-family: var(--font-heading); /* Parkinsans */
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    background: var(--gradient-primary); /* Uses admin theme gradient */
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.bm-login-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.bm-login-button:active {
    transform: translateY(0);
}

/* ========================================
 * Divider
 * ======================================== */

.bm-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-6) 0;
}

.bm-divider::before,
.bm-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-gray-200);
}

.bm-divider-text {
    padding: 0 var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

/* ========================================
 * Social Login
 * ======================================== */

.bm-social-buttons {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.bm-btn-social {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.bm-btn-social:hover {
    border-color: var(--color-primary);
    background: rgba(230, 27, 65, 0.05);
}

.bm-btn-social i {
    font-size: var(--text-lg);
}

/* ========================================
 * Footer Links
 * ======================================== */

.bm-form-footer {
    text-align: center;
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-gray-200);
}

.bm-form-footer p,
.bm-signup-prompt {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    margin: 0;
}

.bm-form-footer a,
.bm-signup-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-base);
}

.bm-form-footer a:hover,
.bm-signup-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ========================================
 * Responsive Design
 * ======================================== */

@media (max-width: 768px) {
    .bm-login-container {
        flex-direction: column;
    }

    .bm-login-brand {
        min-height: 40vh;
        padding: var(--space-8);
    }

    .bm-brand-title {
        font-size: var(--text-xl); /* 2 sizes smaller: 3xl → xl (20px) */
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .bm-brand-description {
        font-size: var(--text-base);
    }

    .bm-form-title {
        font-size: var(--text-3xl);
    }

    .bm-login-form-container {
        padding: var(--space-6);
    }

    .bm-form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .bm-social-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .bm-brand-title {
        font-size: var(--text-base); /* 2 sizes smaller: 2xl → base (16px) */
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .bm-form-title {
        font-size: var(--text-2xl);
    }

    .bm-login-form-container {
        padding: var(--space-4);
    }
}
