/* 
 * Premium Authentication Pages - Material UI Implementation
 * For Info-Technology.com
 */

/* Authentication page layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-background);
    font-family: 'Inter', 'Roboto', sans-serif;
    margin: 0;
}

/* Premium containers with depth and dimension */
.login-container,
.register-container {
    width: 100%;
    max-width: 440px;
    margin: 5vh auto;
    background: var(--color-surface-variant);
    border-radius: 12px;
    box-shadow: var(--shadow-lg), 
                0 30px 60px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    overflow: hidden;
    position: relative;
    animation: container-fade-in 0.6s ease-out;
}

/* Premium accent top bar */
.login-container::before,
.register-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(224, 224, 224, 0.1), 
        rgba(224, 224, 224, 0.6), 
        rgba(224, 224, 224, 0.1));
    z-index: 5;
}

/* Main content area with padding */
.auth-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Headline with icon */
.auth-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.auth-header h2 {
    margin: 0 0 0.75rem 0;
    color: var(--color-text-primary);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Icon in circular premium badge */
.auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    background: var(--color-surface-elevated);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.auth-icon .material-icons {
    font-size: 32px;
    color: var(--color-accent, #e0e0e0);
}

.auth-subtitle {
    color: var(--color-text-secondary);
    font-size: 1rem;
    font-weight: 400;
    max-width: 85%;
    margin: 0 auto;
}

/* Form styling */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Grouped first/last name fields */
.first-last-name-container {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.name-box {
    flex: 1;
}

/* Simplified Input Field Structure */
.input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

/* Material input styling */
.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
    width: 100%;
    padding: 12px 40px 12px 40px;
    background-color: var(--color-surface-variant, #222);
    color: var(--color-text-primary, #fff);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus,
.login-form input[type="email"]:focus {
    border-color: var(--color-accent, #e0e0e0);
    outline: none;
    background-color: var(--color-surface-elevated, #2a2a2a);
    box-shadow: 0 0 0 3px rgba(224, 224, 224, 0.15);
}

/* Icon within input field - adjusted for centered positioning */
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-group input:focus ~ .input-icon,
.input-group:focus-within .input-icon {
    color: var(--color-accent, #e0e0e0);
}

/* Password visibility toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
    cursor: pointer;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--color-text-primary, #fff);
}

/* Remember me checkbox */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    color: var(--color-text-secondary, rgba(255, 255, 255, 0.7));
}

.remember-me input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: var(--color-accent, #e0e0e0);
}

.forgot-password {
    color: var(--color-accent, #e0e0e0);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--color-accent-hover, #fff);
    text-decoration: underline;
}

/* Button container */
.button-container {
    width: 100%;
    margin-top: 1.5rem;
}

/* reCAPTCHA container */
.recaptcha-container {
    width: 100%;
    margin: 1.25rem 0;
    display: flex;
    justify-content: center;
}

/* Premium submit button */
.login-form input[type="submit"] {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-accent, #e0e0e0);
    color: var(--color-background, #121212);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-form input[type="submit"]:hover {
    background-color: var(--color-accent-hover, #fff);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 15px rgba(0, 0, 0, 0.3));
}

.login-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Divider with text */
.divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 1.5rem 0;
    color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--color-border, rgba(255, 255, 255, 0.15));
}

.divider span {
    padding: 0 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Social login buttons */
.social-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--color-surface-variant, #222);
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.15));
    color: var(--color-text-secondary, rgba(255, 255, 255, 0.7));
    transition: all 0.3s ease;
}

.social-btn:hover {
    background-color: var(--color-surface-elevated, #2a2a2a);
    border-color: var(--color-accent, #e0e0e0);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm, 0 2px 5px rgba(0, 0, 0, 0.2));
    color: var(--color-text-primary, #fff);
}

.social-btn .material-icons {
    font-size: 20px;
}

/* Account link */
.account-link {
    margin-top: 2rem;
    text-align: center;
    color: var(--color-text-secondary, rgba(255, 255, 255, 0.7));
    font-size: 0.875rem;
}

.account-link a {
    color: var(--color-accent, #e0e0e0);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.account-link a:hover {
    color: var(--color-accent-hover, #fff);
    text-decoration: underline;
}

/* Terms and policy text */
.terms-text {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
    max-width: 80%;
}

.terms-text a {
    color: var(--color-accent, #e0e0e0);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes container-fade-in {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .login-container,
    .register-container {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
    
    .auth-content {
        padding: 2rem 1.5rem;
    }
    
    .first-last-name-container {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
}

/* Password strength indicator */
.password-strength {
    width: 100%;
    height: 4px;
    background: var(--color-border, rgba(255, 255, 255, 0.15));
    margin-top: 0.5rem;
    border-radius: 2px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-meter.weak {
    width: 33%;
    background-color: #d32f2f;
}

.strength-meter.medium {
    width: 66%;
    background-color: #ff9800;
}

.strength-meter.strong {
    width: 100%;
    background-color: #2e7d32;
}

/* JavaScript-enhanced states */
.input-error {
    border-color: #d32f2f !important;
}

.error-message {
    color: #e57373;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding-left: 3rem;
}

/* Simplified overall form styling to match screenshots */
.login-form {
    text-align: center;
}

/* Fix navigation menu styling to match screenshots */
nav.menu ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav.menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}