﻿/* wwwroot/css/login.css */
* {
    box-sizing: border-box;
}

.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

/* Mobile Layout (default) */
.mobile-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.mobile-header {
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.85);
}

.mobile-logo {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(2px 2px 8px rgba(0,0,0,0.14));
}

.mobile-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.mobile-login-form {
    background: rgba(255,255,255,0.95);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.16);
    padding: 2rem 1.5rem 1.5rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

/* Language Toggle for Mobile */
.language-toggle-mobile {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.background-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#0ed96a 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

/* Desktop Layout */
.desktop-layout {
    display: none;
    flex-direction: row;
    min-height: 100vh;
}

.left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.desktop-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 8px rgba(0,0,0,0.14));
}

.welcome-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
    color: #222;
}

.welcome-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    opacity: 0.88;
    color: #444;
}

.welcome-description {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.93;
    font-family: 'Segoe UI', sans-serif;
    color: #555;
}

.right-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.10);
    min-height: 100vh;
    position: relative;
}

.desktop-login-form {
    background: rgba(255,255,255,0.95);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.16);
    padding: 2rem 1.5rem 1.5rem;
    width: 100%;
    max-width: 410px;
    position: relative;
    z-index: 10;
}

/* Language Toggle for Desktop */
.lang-toggle-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

/* Common Language Switch Styles */
.language-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    font-weight: 600;
    backdrop-filter: blur(4px);
    border: 1px solid #e0e0e0;
}

    .language-switch span {
        font-size: 0.9rem;
        color: #333;
        font-weight: 600;
    }

    /* Radzen Switch Customization */
    .language-switch .rz-switch {
        margin: 0 4px;
    }

    .language-switch .rz-switch-span {
        width: 40px !important;
        height: 20px !important;
    }

    .language-switch .rz-switch-handle {
        width: 16px !important;
        height: 16px !important;
    }

/* Common Styles for Both Layouts */
.lock-icon {
    font-size: 3rem;
    color: #3f51b5;
    margin-bottom: 0.5rem;
}

.login-title {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: #222;
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
}

.login-form {
    width: 100%;
}

.rz-form-group {
    margin-bottom: 1.2rem;
}

.form-input {
    width: 100%;
    font-size: 16px;
    border-radius: 5px;
}

.error-message {
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.remember-me {
    margin-bottom: 1rem;
}

.form-error-container {
    margin-bottom: 1rem;
    width: 100%;
}

.form-error {
    width: 100%;
}

.centered-button {
    margin-bottom: 1.2rem;
}

.login-button {
    width: 100%;
    font-size: 1.1rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border: none;
    padding: 0.75rem;
}

.register-link-container {
    width: 100%;
    text-align: center;
}

.register-text {
    color: #666;
    font-size: 0.9rem;
}

.register-link {
    color: #3f51b5;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.25rem;
    font-size: 0.9rem;
}

    .register-link:hover {
        text-decoration: underline;
    }

/* Tablet and Desktop */
@media (min-width: 768px) {
    .mobile-layout {
        display: none;
    }

    .desktop-layout {
        display: flex;
    }

    .left-side {
        padding: 2rem;
    }

    .right-side {
        padding: 2rem;
    }

    .content-wrapper {
        max-width: 500px;
    }

    .desktop-logo {
        max-width: 180px;
        margin-bottom: 1.5rem;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-subtitle {
        font-size: 1.5rem;
    }

    .welcome-description {
        font-size: 1rem;
    }

    .desktop-login-form {
        padding: 2.5rem 2rem 2rem;
        min-width: 340px;
    }

    .lock-icon {
        font-size: 3.5rem;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .login-button {
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .left-side {
        padding: 3rem;
    }

    .right-side {
        padding: 3rem;
    }

    .desktop-logo {
        max-width: 200px;
    }

    .welcome-title {
        font-size: 2.25rem;
    }

    .welcome-subtitle {
        font-size: 1.75rem;
    }

    .welcome-description {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .desktop-login-form {
        padding: 3rem 2.5rem 2rem;
    }

    .lock-icon {
        font-size: 4rem;
    }

    .login-title {
        font-size: 2rem;
    }
}

/* Small mobile fixes */
@media (max-width: 375px) {
    .mobile-header {
        padding: 1rem 0.75rem 0.75rem;
    }

    .mobile-logo {
        max-width: 100px;
    }

    .mobile-form-container {
        padding: 1rem 0.75rem;
    }

    .mobile-login-form {
        padding: 1.5rem 1rem 1rem;
    }

    .language-toggle-mobile {
        top: 10px;
        right: 10px;
    }

    .language-switch {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

        .language-switch span {
            font-size: 0.8rem;
        }

    .lock-icon {
        font-size: 2.5rem;
    }

    .login-title {
        font-size: 1.25rem;
    }
}

/* Extra small devices */
@media (max-width: 320px) {
    .language-switch {
        transform: scale(0.9);
        transform-origin: top right;
    }
}
