/* 
 * Login Page Styles - Dedicated stylesheet for login pages
 * Contains all styles needed for login, registration, and 2FA pages
 */

/* NOTE: Color variables, dark mode tokens, base reset, and body styles
   are now centralized in variables.css and reset.css */

/* ===== LOGIN PAGE STYLES ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-color);
    background-image: linear-gradient(to bottom right, rgba(var(--primary-color-rgb), 0.05), rgba(var(--primary-color-rgb), 0.1));
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.login-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(var(--primary-color-rgb), 0.05) 1%, transparent 5%), radial-gradient(circle at 75% 75%, rgba(var(--primary-color-rgb), 0.05) 1%, transparent 5%), radial-gradient(circle at 50% 50%, rgba(var(--primary-color-rgb), 0.05) 1%, transparent 5%);
    background-size: 60px 60px;
    opacity: 0.6;
    z-index: 0;
}

.login-card {
    background-color: var(--bg-light);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
    transition: var(--transition);
    z-index: 1;
    animation: cardAppear 0.5s ease forwards;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.07);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

.login-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    text-align: center;
    height: auto;
    line-height: 1;
}

.login-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-light);
    color: var(--text-color);
    height: 48px; /* Add a consistent height */
    line-height: normal; /* Reset line-height to prevent text misalignment */
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.login-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-button > * + * {
    margin-left: 0.5rem;
}

.login-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.login-button:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* ===== REGISTRATION PAGE STYLES ===== */
.register-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--bg-color);
    background-image: linear-gradient(to bottom right, rgba(var(--primary-color-rgb), 0.05), rgba(var(--primary-color-rgb), 0.1));
}

.register-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 550px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    margin-bottom: 2rem;
    animation: cardAppear 0.5s ease forwards;
}

.register-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.register-logo {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

.register-logo img,
.business-logo {
    max-height: 60px;
    margin-bottom: 1rem;
}

.register-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.register-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

.register-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-light);
    color: var(--text-color);
}

.register-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.form-row {
    display: flex;
    margin-bottom: 1rem;
}
.form-row > * + * {
    margin-left: 1rem;
}

.form-row .input-group {
    flex: 1;
    margin-bottom: 0;
}

.register-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
}
.register-button > * + * {
    margin-left: 0.5rem;
}

.register-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.register-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.login-button {
    background-color: var(--primary-color);
    margin-top: 1rem;
}

.account-link-section {
    text-align: center;
    margin-top: 1.5rem;
}

.verification-link-section {
    text-align: center;
    margin-top: 1rem;
}

.verification-link {
    color: var(--primary-color);
    text-decoration: none;
}

/* ===== SOCIAL LOGIN STYLES ===== */
.social-login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.social-login-divider span {
    padding: 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.social-login-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid var(--border-color);
}

.google-login-button {
    background-color: var(--bg-light);
    color: var(--text-color);
}

.google-login-button:hover {
    background-color: var(--bg-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.google-login-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.google-icon {
    flex-shrink: 0;
}

/* Theme toggle styling for login page */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--text-color);
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.theme-toggle > * + * {
    margin-left: 0.5rem;
}

/* Enhanced theme toggle styling for login page */
.login-theme-toggle,
.login-card #themeToggleBtn,
.login-card .theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
    color: var(--text-color);
    border: none;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.login-theme-toggle > * + *,
.login-card #themeToggleBtn > * + *,
.login-card .theme-toggle > * + * {
    margin-left: 0.5rem;
}

/* Icon styling for the theme toggle - mobile only */
@media (max-width: 1024px) {
    .login-theme-toggle i,
    .login-card #themeToggleBtn i,
    .login-card .theme-toggle i {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        font-size: 1.2rem;
        margin: 0;
        line-height: 1;
    }
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.login-theme-toggle:hover,
.login-card #themeToggleBtn:hover,
.login-card .theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* For larger screens, show the text label */
@media (min-width: 1025px) {
    .login-theme-toggle,
    .login-card #themeToggleBtn,
    .login-card .theme-toggle.login-theme-toggle,
    .login-card .theme-toggle {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: auto;
        height: auto;
        max-width: none;
        min-width: 0;
        border-radius: var(--border-radius);
        padding: 0.5rem 0.75rem;
        background-color: var(--bg-dark);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-color);
        border: none;
        cursor: pointer;
        transition: var(--transition);
        font-size: 0.9rem;
        z-index: 100;
    }
    .login-theme-toggle > * + *,
    .login-card #themeToggleBtn > * + *,
    .login-card .theme-toggle.login-theme-toggle > * + *,
    .login-card .theme-toggle > * + * {
        margin-left: 0.5rem;
    }
    
    .login-theme-toggle span,
    .login-card #themeToggleBtn span,
    .login-card .theme-toggle.login-theme-toggle span,
    .login-card .theme-toggle span,
    .theme-label,
    .login-theme-toggle .theme-label,
    .login-card #themeToggleBtn .theme-label,
    .login-card .theme-toggle .theme-label {
        display: inline-block;
        font-size: 0.9rem;
        line-height: 1.2;
        margin-left: 0.25rem;
        visibility: visible;
    }
    
    .login-theme-toggle i,
    .login-card #themeToggleBtn i,
    .login-card .theme-toggle.login-theme-toggle i,
    .login-card .theme-toggle i {
        font-size: 1rem;
        display: inline-block;
        width: auto;
        height: auto;
        margin: 0;
    }
    
    .login-theme-toggle:hover,
    .login-card #themeToggleBtn:hover,
    .login-card .theme-toggle.login-theme-toggle:hover,
    .login-card .theme-toggle:hover {
        background-color: var(--primary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */
/* Consolidated from login-mobile.css - Mobile-first approach with media queries */

/* Special fix for all mobile viewports */
@media (max-width: 1024px) {
    .input-group .input-icon {
        display: inline-block !important;
        line-height: 1.5rem !important;
        height: 1.5rem !important;
        width: 1.5rem !important;
        top: 14px !important;
        transform: none !important;
        bottom: auto !important;
        margin: 0 !important;
        position: absolute !important;
        right: 1rem !important;
    }

    /* Ensure input height is consistent */
    .login-input {
        height: 54px !important;
        line-height: normal !important;
    }
}

/* ===== MEDIUM SCREENS (UP TO 1024px) ===== */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Theme toggle styling for medium screens */
    .login-theme-toggle,
    .login-card #themeToggleBtn,
    .login-card .theme-toggle.login-theme-toggle {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        z-index: 10;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-dark);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        max-width: 40px;
        overflow: hidden;
    }

    /* Hide text and only show icon on medium screens */
    .login-theme-toggle span,
    .login-card #themeToggleBtn span,
    .login-card .theme-toggle.login-theme-toggle span,
    .theme-label {
        display: none;
    }

    .login-theme-toggle i,
    .login-card #themeToggleBtn i,
    .login-card .theme-toggle.login-theme-toggle i {
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: 0;
    }

    /* Input group positioning for medium screens */
    .input-group {
        position: relative;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
    }

    /* Login input styling for medium screens */
    .login-input {
        padding: 0.85rem 2.5rem 0.85rem 1rem;
        font-size: 1.05rem;
        height: 54px;
        line-height: normal;
        border-radius: 12px;
        width: 100%;
        -webkit-appearance: none;
        appearance: none;
        display: block;
    }

    /* Input icon alignment for medium screens */
    .input-icon {
        position: absolute;
        right: 1rem;
        top: 14px;
        transform: none;
        color: var(--text-light);
        display: inline-block;
        width: 1.5rem;
        height: 1.5rem;
        text-align: center;
        font-size: 1.1rem;
        z-index: 10;
        line-height: 1.5rem;
    }
}

/* ===== TABLET AND MOBILE STYLES (UP TO 768px) ===== */
@media (max-width: 768px) {
    /* Login card styling - enhanced for mobile */
    .login-card {
        max-width: 100%;
        width: 100%;
        padding: 2rem;
        margin: 0 auto;
        border-radius: 16px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    /* Login header styling */
    .login-header {
        margin-bottom: 1.75rem;
    }

    .login-logo {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }

    .login-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
        max-width: 100%;
        line-height: 1.4;
    }

    /* Input styling for mobile */
    .input-group {
        margin-bottom: 1.25rem;
        position: relative;
        display: flex;
        align-items: center;
    }

    .login-input {
        padding: 0.85rem 2.5rem 0.85rem 1rem;
        font-size: 1.05rem;
        height: 54px;
        line-height: normal;
        border-radius: 12px;
        width: 100%;
        -webkit-appearance: none;
        appearance: none;
        display: block;
    }

    .input-icon {
        position: absolute;
        right: 1rem;
        top: 14px;
        transform: none;
        color: var(--text-light);
        display: inline-block;
        width: 1.5rem;
        height: 1.5rem;
        text-align: center;
        font-size: 1.1rem;
        z-index: 10;
        line-height: 1.5rem;
    }

    /* Button styling for mobile */
    .login-button {
        padding: 0.85rem;
        font-size: 1.1rem;
        height: 50px;
        border-radius: 12px;
        margin-top: 0.75rem;
    }

    .login-button:hover {
        transform: translateY(-1px);
    }

    /* Message styling for mobile */
    .message {
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }

    .message-header {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }

    .message-body {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }

    .message-icon {
        font-size: 1.1rem;
    }

    /* Theme toggle styling for mobile */
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    /* Specific positioning for login page theme toggle on mobile */
    .login-theme-toggle {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        z-index: 10;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-dark);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        max-width: 40px;
    }

    /* Hide text and only show icon on mobile */
    .login-theme-toggle span,
    .login-card #themeToggleBtn span,
    .login-card .theme-toggle span,
    .theme-label,
    .login-theme-toggle .theme-label,
    .login-card #themeToggleBtn .theme-label,
    .login-card .theme-toggle .theme-label {
        display: none !important;
    }

    .login-theme-toggle i,
    .login-card #themeToggleBtn i,
    .login-card .theme-toggle i {
        font-size: 1.2rem;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
    }

    /* Account and verification link sections */
    .account-link-section,
    .verification-link-section {
        margin-top: 1.5rem;
        padding-top: 0.5rem;
        text-align: center;
    }

    .verification-link {
        display: inline-block;
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }

    /* Login footer styling */
    .login-footer {
        margin-top: 1.75rem;
        padding-top: 0.85rem;
        font-size: 0.85rem;
    }

    /* Ensure login page takes full height and has proper padding */
    .login-page {
        padding: 1rem;
        min-height: 100vh;
    }

    /* Scale business logo for mobile */
    .business-logo {
        max-height: 60px;
        max-width: 80%;
        margin-bottom: 1rem;
        object-fit: contain;
    }

    /* Register button styling */
    .register-button {
        margin-top: 1rem;
        padding: 0.85rem;
        height: 50px;
        font-size: 1.1rem;
        border-radius: 12px;
    }

    /* Register page specific styles */
    .register-page {
        padding: 1rem;
    }

    .register-card {
        max-width: 100%;
        width: 100%;
        padding: 2rem;
        margin: 0 auto;
        border-radius: 16px;
    }

    .register-header {
        margin-bottom: 1.75rem;
    }

    .register-logo {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }

    .register-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .register-subtitle {
        font-size: 0.9rem;
        max-width: 100%;
        line-height: 1.4;
    }

    .register-input {
        padding: 0.85rem 2.5rem 0.85rem 1rem;
        font-size: 1.05rem;
        height: 50px;
        border-radius: 12px;
        min-height: 44px;
    }
}

/* ===== MESSAGE STYLES ===== */
.message {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.message-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.message-header > * + * {
    margin-left: 0.5rem;
}

.message-body {
    padding: 0.75rem 1rem;
    background-color: var(--bg-light);
    font-size: 0.9rem;
}

.message p {
    margin: 0;
}

.message-icon {
    font-size: 1rem;
}

/* Error message styling */
.message.error .message-header {
    background-color: var(--error-color);
    color: white;
}

/* Success message styling */
.message.success .message-header {
    background-color: var(--success-color);
    color: white;
}

/* Info message styling */
.message.info .message-header {
    background-color: #4cc9f0;
    color: white;
}

/* Animation for card appearance */
@keyframes cardAppear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
