/* ===================================
   Authentication Pages Styles
   =================================== */

.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow-x: hidden;
}

.auth-left {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-right {
    background: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    top: -150px;
    left: -150px;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(240, 147, 251, 0.15);
    border-radius: 50%;
    bottom: -150px;
    right: -150px;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.auth-branding {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.auth-branding .logo {
    color: white;
    margin-bottom: 3rem;
    display: inline-flex;
}

.auth-branding h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.auth-branding > p {
    font-size: 1.125rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-feature i {
    font-size: 1.5rem;
    color: var(--success-color);
}

.auth-feature span {
    font-size: 1.125rem;
}

.auth-right {
    background: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-container {
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

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

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 2rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.social-auth {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.social-btn:hover {
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.social-btn.google {
    color: #DB4437;
}

.social-btn.github {
    color: #333;
}

.auth-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin: 0;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
        padding-top: 70px; /* offset for fixed navbar */
        min-height: 100vh;
    }
    
    .auth-left {
        display: none;
    }
    
    .auth-right {
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 70px);
        align-items: flex-start;
    }
    
    .auth-form-container {
        max-width: 100% !important;
        width: 100%;
        padding: 0;
    }
    
    .auth-header {
        padding-top: 1rem !important;
    }
}

/* Google button wrapper — responsive container */
.google-btn-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

/* Force Google Sign-In iframe to never overflow its container */
.google-btn-inner iframe,
.google-btn-inner > div[id^="credential_picker"],
#g_id_onload + div iframe,
.g_id_signin iframe {
    max-width: 100% !important;
}

.google-btn-inner {
    background: white;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    max-width: 100%;
}

/* Force Google button to fill container on all screen sizes */
.google-btn-inner iframe,
.google-btn-inner > div {
    max-width: 100% !important;
}

@media (max-width: 480px) {
    .auth-container {
        padding-top: 65px;
    }
    
    .auth-right {
        padding: 1rem 0.875rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    /* Scale down Google button to fit narrow screens */
    .google-btn-inner {
        padding: 6px;
    }
    
    .google-btn-inner iframe {
        transform-origin: left center;
        transform: scale(0.82);
        margin-right: -18%;
    }
    
    .auth-info,
    .auth-terms {
        padding: 1rem !important;
    }
    
    .auth-info h4 {
        font-size: 0.95rem;
    }
    
    .auth-info p {
        font-size: 0.82rem !important;
    }
    
    .auth-terms p {
        font-size: 0.78rem !important;
    }
    
    .google-auth-section {
        margin: 1.25rem 0 !important;
    }
    
    .social-auth {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Email Confirmation Message
   =================================== */
.email-confirmation-message {
    text-align: center;
    padding: 1.5rem;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.confirmation-icon i {
    font-size: 2.5rem;
    color: white;
}

.email-confirmation-message h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.email-confirmation-message p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.email-highlight {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 1rem 0;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.confirmation-actions .btn-primary,
.confirmation-actions .btn-secondary {
    flex: 0 0 auto;
    padding: 0.75rem 1.5rem;
}

.confirmation-actions .btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.confirmation-actions .btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.confirmation-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.confirmation-steps {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.confirmation-steps .step {
    flex: 1;
    text-align: center;
}

.confirmation-steps .step i {
    font-size: 2rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.confirmation-steps .step span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
}

@media (max-width: 768px) {
    .confirmation-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions .btn-primary,
    .confirmation-actions .btn-secondary {
        width: 100%;
    }
}
