/* Shared Authentication Styles for Login, Signup, and OAuth pages */

/* Common Container Styles - Override existing global styles */
.auth-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 2rem !important;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(74, 144, 226, 0.05) 100%) !important;
    overflow-y: auto !important;
}

/* Signup page specific - content at top */
.auth-container.signup-container {
    align-items: flex-start !important;
    padding: 4rem 2rem 2rem 2rem !important;
}

.auth-area {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    padding: 2.5rem !important;
    width: 100% !important;
    max-width: 500px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin: auto 0 !important;
}

/* Header Styles */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: #1a1a1a;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    font-family: 'Inter', sans-serif;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Styles */
.auth-submit-btn {
    width: 100%;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2d6da3 100%);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    transform: translateY(-1px);
}

.auth-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

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

/* OAuth Section Styles */
.oauth-section {
    margin-bottom: 2rem;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #ffffff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    gap: 0.75rem;
    cursor: pointer;
    outline: none;
    position: relative;
    overflow: hidden;
}

.google-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.google-btn:hover::before {
    left: 100%;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.google-btn:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    text-decoration: none !important;
}

.google-btn:active {
    transform: translateY(0);
    text-decoration: none !important;
}

.google-btn:visited {
    text-decoration: none !important;
}

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

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
}

.auth-divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1.5rem;
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
    display: inline-block;
}

/* Footer Styles */
.auth-footer {
    text-align: center;
    margin-top: 1rem;
}

.auth-link {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.auth-link a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* Comment Section Styles (for signup) */
.comment-toggle-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.comment-toggle-btn:hover {
    background: #e9ecef;
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

.comment-toggle-btn:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.comment-toggle-btn.active {
    background: #e3f2fd;
    border-color: #4a90e2;
    color: #4a90e2;
}

.toggle-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.comment-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

/* Checkbox Styles */
.checkbox-group {
    margin-bottom: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    border-radius: 4px;
}

.checkbox-item input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.checkbox-item label {
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.4;
}

.checkbox-item a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-item a:hover {
    text-decoration: underline;
}

/* Error Styles */
.errorlist {
    color: #dc3545;
    font-size: 0.85rem;
    margin: 0.25rem 0 0 0;
    padding: 0;
    list-style: none;
    animation: fadeIn 0.3s ease;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OAuth Specific Styles */
.oauth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(74, 144, 226, 0.05) 100%);
}

.oauth-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.oauth-form {
    margin-bottom: 2.5rem;
}

.google-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #ffffff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    gap: 0.75rem;
    outline: none;
    position: relative;
    overflow: hidden;
}

.google-oauth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.google-oauth-btn:hover::before {
    left: 100%;
}

.google-oauth-btn:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.google-oauth-btn:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.google-oauth-btn:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.oauth-footer {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.legal-text {
    color: #888;
    font-size: 0.85rem;
    line-height: 1.5;
}

.legal-text a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.legal-text a:hover {
    color: #357abd;
    text-decoration: underline;
}

.back-link {
    display: flex;
    justify-content: center;
}

.back-link a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.back-link a:hover {
    color: #357abd;
    background: rgba(74, 144, 226, 0.05);
    border-color: rgba(74, 144, 226, 0.1);
    transform: translateX(-2px);
}

.back-link a:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.back-link svg {
    transition: transform 0.2s ease;
}

.back-link a:hover svg {
    transform: translateX(-2px);
}

/* Enhanced loading state */
.google-oauth-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.google-oauth-btn.loading .btn-text {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.google-oauth-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container,
    .oauth-container {
        padding: 1rem !important;
    }
    
    .auth-container.signup-container {
        padding: 2rem 1rem 1rem 1rem !important;
    }
    
    .auth-area,
    .oauth-area {
        padding: 2rem 1.5rem;
    }
    
    .auth-header h2,
    .oauth-header h2 {
        font-size: 1.5rem;
    }
    
    .google-btn,
    .google-oauth-btn,
    .auth-submit-btn {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-area,
    .oauth-area {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .auth-header h2,
    .oauth-header h2 {
        color: #ffffff;
    }
    
    .auth-header p,
    .oauth-header p {
        color: #cccccc;
    }
    
    .google-btn,
    .google-oauth-btn {
        background: #2a2a2a;
        color: #ffffff;
        border-color: #444444;
    }
    
    .google-btn:hover,
    .google-oauth-btn:hover {
        background: #333333;
        border-color: #555555;
    }
    
    .legal-text {
        color: #aaaaaa;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #2a2a2a;
        color: #ffffff;
        border-color: #444444;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #4a90e2;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .auth-area,
    .oauth-area,
    .google-btn,
    .google-oauth-btn,
    .auth-submit-btn,
    .back-link a,
    .back-link svg {
        animation: none;
        transition: none;
    }
    
    .google-btn::before,
    .google-oauth-btn::before {
        display: none;
    }
} 