/* NOMAD LIFE Authentication Styles */

@import url('https://fonts.googleapis.com/css2?family=Geom:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gray: #6b7280;
    --light-gray: #f3f4f6;
    --medium-gray: #d1d5db;
    --dark-gray: #374151;
    --white: #ffffff;
    --intense-blue: #2563eb;
    --intense-orange: #ea580c;
    --success-green: #16a34a;
    --warning-yellow: #eab308;
    --error-red: #dc2626;
    --border-radius: 0px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geom', sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

#nomad-life-auth {
    min-height: 100vh;
    position: relative;
}

/* Language Switcher */
.auth-language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--white);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.auth-language-switcher a {
    color: var(--primary-gray);
    text-decoration: none;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: var(--border-radius);
}

.auth-language-switcher a:hover,
.auth-language-switcher a.active {
    color: var(--intense-blue);
    background: var(--light-gray);
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--intense-blue) 0%, #1d4ed8 50%, var(--intense-orange) 100%);
    z-index: -1;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* Auth Form Container */
.auth-form-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo h1 {
    font-family: 'Geom', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.auth-logo p {
    color: var(--primary-gray);
    font-size: 14px;
}

/* Auth Forms */
.auth-forms-wrapper {
    position: relative;
    min-height: 400px;
}

.auth-form {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: var(--transition);
}

.auth-form.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.auth-form h2 {
    font-family: 'Geom', sans-serif;
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--dark-gray);
}

/* Form Elements */
.auth-form-element {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-family: 'Geom', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--intense-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input.error {
    border-color: var(--error-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error {
    display: none;
    color: var(--error-red);
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.form-group input.error + .form-error {
    display: block;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 38px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-gray);
    transition: var(--transition);
    padding: 4px;
}

.password-toggle:hover {
    color: var(--dark-gray);
}

.eye-icon {
    font-size: 16px;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    display: none;
}

.strength-bar {
    height: 4px;
    background: var(--medium-gray);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    transition: var(--transition);
    background: var(--error-red);
}

.strength-bar.weak::after {
    width: 33%;
    background: var(--error-red);
}

.strength-bar.medium::after {
    width: 66%;
    background: var(--warning-yellow);
}

.strength-bar.strong::after {
    width: 100%;
    background: var(--success-green);
}

.strength-text {
    font-size: 11px;
    color: var(--primary-gray);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--primary-gray);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    position: relative;
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--intense-blue);
    border-color: var(--intense-blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 10px;
    font-weight: bold;
}

.forgot-password {
    color: var(--intense-blue);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    background: var(--intense-orange);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    font-family: 'Geom', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    background: #c2410c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    background: var(--medium-gray);
    cursor: not-allowed;
    transform: none;
}

.btn-text,
.btn-loader {
    display: inline-block;
    transition: var(--transition);
}

.auth-submit-btn.loading .btn-text {
    opacity: 0;
}

.auth-submit-btn.loading .btn-loader {
    opacity: 1;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.auth-switch p {
    color: var(--primary-gray);
    font-size: 14px;
    margin-bottom: 8px;
}

.switch-link {
    color: var(--intense-blue);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.switch-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Social Login */
.social-login {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.divider {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--medium-gray);
}

.divider span {
    background: var(--white);
    padding: 0 16px;
    color: var(--primary-gray);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: 1px solid var(--medium-gray);
    background: var(--white);
    border-radius: var(--border-radius);
    font-family: 'Geom', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--dark-gray);
}

.social-btn:hover {
    background: var(--light-gray);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.social-icon {
    font-size: 18px;
}

.google-btn:hover {
    border-color: #ea4335;
    color: #ea4335;
}

.facebook-btn:hover {
    border-color: #1877f2;
    color: #1877f2;
}

/* Notifications */
.auth-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    max-width: 400px;
    border-left: 4px solid var(--intense-blue);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-20px);
    transition: var(--transition);
}

.auth-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.auth-notification.success {
    border-left-color: var(--success-green);
}

.auth-notification.error {
    border-left-color: var(--error-red);
}

.auth-notification.info {
    border-left-color: var(--intense-blue);
}

.auth-notification.warning {
    border-left-color: var(--warning-yellow);
}

.notification-message {
    font-weight: 500;
    margin-bottom: 8px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--primary-gray);
    float: right;
    padding: 0;
    margin-left: 16px;
}

.notification-close:hover {
    color: var(--dark-gray);
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-form-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .auth-logo h1 {
        font-size: 28px;
    }
    
    .auth-form h2 {
        font-size: 22px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .auth-language-switcher {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-form-container {
        margin: 10px;
        padding: 25px 15px;
    }
    
    .auth-logo h1 {
        font-size: 24px;
    }
    
    .auth-form h2 {
        font-size: 20px;
    }
    
    .form-group input {
        padding: 10px 14px;
    }
    
    .auth-submit-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Loading State */
body.loading {
    cursor: wait;
}

body.loading * {
    pointer-events: none;
}

.auth-form-container.loading {
    opacity: 0.7;
}

/* Focus Styles */
.form-group input:focus + .password-toggle {
    color: var(--intense-blue);
}

/* Success State */
.auth-form.success {
    animation: fadeInUp 0.6s ease-out;
}

/* Error State */
.auth-form.error {
    animation: shake 0.5s ease-in-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-group input {
        border-width: 2px;
    }
    
    .auth-submit-btn {
        border: 2px solid var(--dark-gray);
    }
    
    .social-btn {
        border-width: 2px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-background {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #c2410c 100%);
    }
    
    .auth-form-container {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .auth-logo h1 {
        color: #f9fafb;
    }
    
    .form-group input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-group input:focus {
        border-color: var(--intense-blue);
    }
    
    .auth-submit-btn {
        background: var(--intense-orange);
    }
    
    .social-btn {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .social-btn:hover {
        background: #4b5563;
    }
}
