/**
 * Firebase Authentication Styles for Taxiar Theme
 * Firebase-Only Authentication
 */

/* Firebase Auth Replacement Section */
.firebase-auth-replacement {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0px 6px 30px rgba(1, 15, 28, 0.1);
    border: 1px solid #e0e0e0;
    max-width: 500px;
    margin: 0 auto;
}

.firebase-auth-replacement h3 {
    color: #333;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

/* Firebase Auth Buttons */
.firebase-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.firebase-auth-buttons .th-btn {
    width: 100%;
    padding: 15px 20px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    border: 2px solid transparent;
}

.firebase-google-auth.th-btn {
    background-color: #db4437 !important;
    border-color: #db4437 !important;
    color: white !important;
}

.firebase-google-auth.th-btn:hover {
    background-color: #c23321 !important;
    border-color: #c23321 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(219, 68, 55, 0.4);
}

.firebase-facebook-auth.th-btn {
    background-color: #3b5998 !important;
    border-color: #3b5998 !important;
    color: white !important;
}

.firebase-facebook-auth.th-btn:hover {
    background-color: #2d4373 !important;
    border-color: #2d4373 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 89, 152, 0.4);
}

.firebase-email-auth.th-btn {
    background-color: #333 !important;
    border-color: #333 !important;
    color: white !important;
}

.firebase-email-auth.th-btn:hover {
    background-color: #555 !important;
    border-color: #555 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(51, 51, 51, 0.4);
}

/* Firebase Auth Modal */
.firebase-auth-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.firebase-auth-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 35px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.firebase-auth-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.firebase-auth-close:hover,
.firebase-auth-close:focus {
    color: #000;
}

.firebase-auth-modal h3 {
    margin-bottom: 25px;
    text-align: center;
    color: #333;
    font-weight: 600;
}

.firebase-auth-modal .form-group {
    margin-bottom: 20px;
}

.firebase-auth-modal .form-control {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.firebase-auth-modal .form-control:focus {
    border-color: var(--theme-color, #007cba);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.auth-actions .btn {
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-actions .btn-primary {
    background-color: var(--theme-color, #007cba);
    border-color: var(--theme-color, #007cba);
}

.auth-actions .btn-outline-primary {
    color: var(--theme-color, #007cba);
    border-color: var(--theme-color, #007cba);
}

.auth-actions .btn-link {
    color: #666;
    text-decoration: none;
}

.auth-actions .btn-link:hover {
    color: var(--theme-color, #007cba);
    text-decoration: underline;
}

/* Loading Overlay */
.firebase-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.firebase-loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    color: #333;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.firebase-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--theme-color, #007cba);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.firebase-loading-text {
    font-weight: 600;
    font-size: 16px;
}

/* Error Alert */
.firebase-error-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.firebase-error-content {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.firebase-error-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #721c24;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/* Success Alert */
.firebase-success-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
}

.firebase-success-content {
    background-color: #28a745;
    color: white;
    padding: 20px 50px 20px 20px;
    border-radius: 8px;
    min-width: 300px;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.firebase-success-close {
    color: white;
    float: right;
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.firebase-success-close:hover {
    opacity: 1;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 576px) {
    .firebase-auth-replacement {
        padding: 25px;
        margin: 10px;
    }
    
    .firebase-auth-modal-content {
        margin: 10% auto;
        padding: 25px;
        width: 95%;
    }
    
    .firebase-auth-buttons {
        gap: 12px;
    }
    
    .firebase-google-auth,
    .firebase-facebook-auth,
    .firebase-email-auth {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .firebase-error-alert {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Integration with existing theme styles */
.firebase-auth-replacement .btn,
.firebase-auth-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.firebase-auth-replacement .btn i,
.firebase-auth-buttons .btn i {
    font-size: 18px;
}

/* Success styling */
.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Hide original WooCommerce forms when Firebase is active */
.woocommerce-form-login,
.woocommerce-form-register {
    transition: opacity 0.3s ease;
}

.firebase-auth-replacement + .woocommerce-form-login,
.firebase-auth-replacement + .woocommerce-form-register {
    display: none;
}

/* Small branding text */
.firebase-auth-replacement small {
    color: #888;
    font-size: 12px;
} 