/* Auth Forms Shared Styles - Register & Login */

/* CSS Variables for BIZUIT colors */
:root {
    --bizuit-orange: #ff6f00;
    --bizuit-orange-dark: #e65f00;
    --bizuit-orange-pressed: #cc5500;
    --bizuit-orange-very-light: #fff3e0;
    --bizuit-font: 'Quicksand', Arial, sans-serif;
}

/* Ensure html and body allow scrolling */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.register-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--bizuit-font);
}

.register-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Side - Welcome Section with Space Theme */
.register-left {
    flex: 1;
    background: linear-gradient(135deg, #ff6f00 0%, #ff8f00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.register-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 30%),
                radial-gradient(circle at 80% 80%, rgba(255, 95, 0, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 60% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.welcome-content {
    text-align: center;
    color: white;
    z-index: 1;
    position: relative;
    max-width: 500px;
    padding: 2rem;
}

/* Space Scene */
.space-scene {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
}

/* Astronaut */
.astronaut {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6rem;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: float-astronaut 6s ease-in-out infinite;
}

@keyframes float-astronaut {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -60%) rotate(5deg); }
}

/* Planets */
.planet {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(2px);
    animation: orbit 20s linear infinite;
}

.planet-1 {
    width: 40px;
    height: 40px;
    top: 20%;
    right: 20%;
    animation-duration: 15s;
}

.planet-2 {
    width: 25px;
    height: 25px;
    bottom: 30%;
    left: 15%;
    animation-duration: 25s;
    animation-direction: reverse;
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

/* Stars */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.stars i {
    position: absolute;
    color: white;
    opacity: 0.7;
    animation: twinkle 3s ease-in-out infinite;
}

.star-1 {
    top: 10%;
    left: 10%;
    font-size: 1.2rem;
    animation-delay: 0s;
}

.star-2 {
    top: 25%;
    right: 15%;
    font-size: 1rem;
    animation-delay: 1s;
}

.star-3 {
    bottom: 20%;
    left: 20%;
    font-size: 1.1rem;
    animation-delay: 2s;
}

.star-4 {
    bottom: 40%;
    right: 25%;
    font-size: 0.9rem;
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Rocket Trail */
.rocket-trail {
    position: absolute;
    bottom: 15%;
    right: 10%;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 2px;
    animation: rocket-trail 4s ease-in-out infinite;
}

@keyframes rocket-trail {
    0% { opacity: 0; transform: translateX(-100px); }
    50% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100px); }
}

/* Welcome Text */
.welcome-text h1 {
    font-size: 3.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-text p {
    font-size: 1.8rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.4;
    margin: 0;
    max-width: 450px;
}

/* Right Side - Register Form */
.register-right {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 2rem;
    overflow-x: hidden;
    min-height: 100vh;
}

.register-form-container {
    width: 100%;
    max-width: 450px;
    margin: 2rem auto;
    padding-top: 1rem;
    padding-bottom: 3rem; /* Espacio adicional para el footer */
    flex: 1; /* Permite que crezca y empuje el footer hacia abajo */
}

.register-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.logo-text {
    color: var(--bizuit-orange);
    font-weight: 600;
    font-size: 2.8rem;
    margin: 0;
    display: block;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2.4rem;
    color: var(--bizuit-text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-subtitle {
    color: var(--bizuit-text-secondary);
    font-size: 1.3rem;
    margin: 0;
}

/* Form Styles - Use exact same styles as login */
.register-form {
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group.half-width {
    flex: 1;
    margin-bottom: 0;
}

.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-top: 0.35rem;
}

.form-check-label {
    color: var(--bizuit-text-secondary);
    font-size: 1.3rem;
    margin-left: 0.25rem;
}

/* Import login input styles */
.login-input {
    height: 64px;
    font-size: 1.4rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1.2rem 1.5rem;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: var(--bizuit-orange);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.1);
    outline: none;
}

/* Import login button styles */
.btn-login,
.btn-primary.btn-login,
#registerBtn,
#loginBtn {
    width: 100%;
    height: 64px;
    font-size: 1.5rem;
    font-weight: 500;
    background-color: var(--bizuit-orange) !important;
    border-color: var(--bizuit-orange) !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: none;
    color: white !important;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
}

.btn-login:hover,
.btn-primary.btn-login:hover,
#registerBtn:hover,
#loginBtn:hover {
    background-color: var(--bizuit-orange-dark) !important;
    border-color: var(--bizuit-orange-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: white !important;
}

.btn-login:focus,
.btn-primary.btn-login:focus,
#registerBtn:focus,
#loginBtn:focus {
    background-color: var(--bizuit-orange) !important;
    border-color: var(--bizuit-orange) !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.3) !important;
}

.btn-login:active,
.btn-primary.btn-login:active,
#registerBtn:active,
#loginBtn:active {
    transform: translateY(1px);
    background-color: var(--bizuit-orange-pressed) !important;
    border-color: var(--bizuit-orange-pressed) !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.btn-login:disabled,
.btn-primary.btn-login:disabled,
#registerBtn:disabled,
#loginBtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    background-color: var(--bizuit-orange) !important;
    border-color: var(--bizuit-orange) !important;
    color: white !important;
}

.btn-login:disabled:hover,
.btn-primary.btn-login:disabled:hover,
#registerBtn:disabled:hover,
#loginBtn:disabled:hover {
    background-color: var(--bizuit-orange) !important;
    border-color: var(--bizuit-orange) !important;
    transform: none;
    box-shadow: none;
    color: white !important;
}

.field-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.1rem;
    color: var(--bizuit-text-secondary);
}

.field-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 1rem;
    color: #dc3545;
    font-weight: 500;
}

input.error,
select.error {
    border-color: #dc3545 !important;
}

input.success {
    border-color: #28a745 !important;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--bizuit-text-secondary);
    cursor: pointer;
    padding: 6px;
    font-size: 1.3rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--bizuit-orange);
}

/* Checkbox */
.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-top: 0.35rem;
}

.form-check-label {
    color: var(--bizuit-text-secondary);
    font-size: 1.3rem;
    margin-left: 0.25rem;
}

.link {
    color: var(--bizuit-orange);
    text-decoration: none;
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

/* Submit Button */
.register-btn {
    width: 100%;
    height: 64px;
    font-size: 1.5rem;
    font-weight: 500;
    background-color: var(--bizuit-orange);
    border-color: var(--bizuit-orange);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.register-btn:hover {
    background-color: var(--bizuit-orange-dark);
    border-color: var(--bizuit-orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.register-btn:active {
    transform: translateY(0);
}

.register-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.register-btn:disabled:hover {
    background-color: var(--bizuit-orange);
    border-color: var(--bizuit-orange);
    transform: none;
    box-shadow: none;
}

.btn-loading {
    margin-left: 0.5rem;
}

/* Messages */
.error-message,
.success-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Footer */
.register-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.register-footer p {
    color: var(--bizuit-text-secondary);
    font-size: 1.3rem;
    margin: 0;
}

.login-link {
    color: var(--bizuit-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-link:hover {
    color: var(--bizuit-orange-dark);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .register-container {
        flex-direction: column;
    }
    
    .register-left {
        display: none;
    }
    
    .register-right {
        flex: 1;
        padding: 1rem;
        min-height: 100vh;
        max-height: none;
        overflow-y: auto;
    }
    
    .register-form-container {
        margin: 1rem auto;
        padding-top: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half-width {
        margin-bottom: 1.25rem;
    }
    
    .welcome-text h1 {
        font-size: 2.5rem;
    }
    
    .welcome-text p {
        font-size: 1.5rem;
        max-width: 350px;
    }
    
    .space-scene {
        height: 200px;
    }
    
    .astronaut {
        font-size: 4.5rem;
    }
}

@media (max-width: 480px) {
    .register-right {
        padding: 0.5rem;
    }
    
    .register-form-container {
        max-width: 100%;
    }
    
    .form-header h2 {
        font-size: 1.75rem;
    }
    
    .logo-text {
        font-size: 2.2rem;
    }
}

/* Login Specific Styles */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #ff6f00 0%, #ff8f00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 95, 0, 0.3) 0%, transparent 60%);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.login-welcome-content {
    text-align: center;
    color: white;
    z-index: 1;
    position: relative;
}

.login-bizuit-logo {
    margin-bottom: 3rem;
}

.login-bizuit-logo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.login-welcome-title {
    font-size: 3.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-welcome-subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.4;
    margin: 0;
    max-width: 450px;
}

/* Bottom Footer */
.login-bottom-footer {
    position: static; /* Cambio de relative a static para flujo normal */
    margin-top: auto;
    padding: 1rem;
    text-align: center;
    color: var(--bizuit-text-secondary);
    font-size: 1.1rem;
    width: 100%;
    background-color: white; /* Asegurar fondo blanco */
    z-index: 10; /* Por encima de otros elementos */
}

.login-bottom-footer .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

/* Asegurar que el contenido no se superponga con el footer */
.register-form-container + .login-bottom-footer {
    margin-top: 2rem; /* Espacio adicional antes del footer */
}

/* Availability Indicators */
.availability-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.availability-indicator.available {
    color: #28a745;
}

.availability-indicator.available i {
    color: #28a745;
}

.availability-indicator.unavailable {
    color: #dc3545;
}

.availability-indicator.unavailable i {
    color: #dc3545;
}

.availability-indicator.checking {
    color: #6c757d;
}

.availability-indicator.checking i {
    color: #6c757d;
}

.availability-indicator.creating {
    color: #17a2b8;
}

.availability-indicator.creating i {
    color: #17a2b8;
}

/* Checkbox styling - Orange theme */
.form-check-input {
    width: 1.2rem !important;
    height: 1.2rem !important;
    margin-top: 0.15rem !important;
    margin-right: 0.5rem !important;
    border: 2px solid #ccc !important;
    border-radius: 3px !important;
    background-color: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.form-check-input:checked {
    background-color: var(--bizuit-orange) !important;
    border-color: var(--bizuit-orange) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    background-size: 0.75rem !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.form-check-input:focus {
    border-color: var(--bizuit-orange) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.2) !important;
}

.form-check-input:hover {
    border-color: var(--bizuit-orange) !important;
}

/* Google Sign-In Button Styles */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.auth-divider span {
    position: relative;
    padding: 0 1rem;
    background: white;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-google {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: white;
    color: #3c4043;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--bizuit-font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c6c6c6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-google:active {
    background: #ececec;
    border-color: #afafaf;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-google .google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-google .btn-text {
    flex: 0 0 auto;
}

/* Google Link Modal Styles */
#google-link-modal .modal-content {
    max-width: 500px;
}

#google-link-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

#google-link-modal .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--bizuit-font);
}

#google-link-modal .form-control:focus {
    outline: none;
    border-color: var(--bizuit-orange);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.2);
}

#google-link-modal .error-message {
    padding: 0.75rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#google-link-modal .error-message i {
    flex-shrink: 0;
}