/**
 * Firebase Authentication CSS
 * 
 * Styles for Firebase authentication forms and buttons
 */

/* Container */
.firebase-auth-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Title */
.firebase-auth-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: #333;
}

/* Message */
.firebase-auth-message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.firebase-auth-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.firebase-auth-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Form */
.firebase-auth-form {
    margin-bottom: 20px;
}

.firebase-auth-field {
    margin-bottom: 15px;
}

.firebase-auth-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.firebase-auth-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.firebase-auth-field input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

/* Actions */
.firebase-auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.firebase-auth-submit {
    padding: 10px 20px;
    background-color: #4285f4;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.firebase-auth-submit:hover {
    background-color: #3367d6;
}

.firebase-auth-forgot-password {
    color: #4285f4;
    text-decoration: none;
    font-size: 14px;
}

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

/* Separator */
.firebase-auth-separator {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #757575;
    font-size: 14px;
}

.firebase-auth-separator::before,
.firebase-auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.firebase-auth-separator span {
    margin: 0 10px;
}

/* Provider buttons */
.firebase-auth-providers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.firebase-auth-button {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.firebase-auth-button:hover {
    background-color: #f5f5f5;
}

.firebase-auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    font-size: 18px;
}

.firebase-auth-text {
    flex: 1;
}

/* Provider-specific styles */
.firebase-auth-google {
    color: #757575;
}

.firebase-auth-google .firebase-auth-icon {
    color: #4285f4;
    font-weight: bold;
}

.firebase-auth-facebook {
    color: #3b5998;
}

.firebase-auth-facebook .firebase-auth-icon {
    font-weight: bold;
}

.firebase-auth-phone {
    color: #48b14c;
}

/* Links */
.firebase-auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.firebase-auth-links a {
    color: #4285f4;
    text-decoration: none;
}

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

/* Profile */
.firebase-auth-profile-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.firebase-auth-profile-photo {
    width: 80px;
    height: 80px;
    margin-right: 20px;
    border-radius: 50%;
    overflow: hidden;
}

.firebase-auth-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.firebase-auth-profile-details {
    flex: 1;
}

.firebase-auth-profile-details h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 20px;
}

.firebase-auth-profile-details p {
    margin-top: 0;
    margin-bottom: 10px;
    color: #757575;
}

.firebase-auth-profile-providers {
    margin-top: 15px;
}

.firebase-auth-profile-providers p {
    margin-bottom: 5px;
    font-weight: 500;
}

.firebase-auth-profile-providers ul {
    margin: 0;
    padding-left: 20px;
}

.firebase-auth-profile-actions {
    margin-top: 20px;
    text-align: center;
}

.firebase-auth-logout {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.firebase-auth-logout:hover {
    background-color: #d32f2f;
}

/* Phone auth modal */
.firebase-auth-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.firebase-auth-modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.firebase-auth-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.firebase-auth-close:hover {
    color: #333;
}

/* WooCommerce integration */
.woocommerce-firebase-auth {
    margin-bottom: 20px;
}

.woocommerce-firebase-auth-checkout {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.woocommerce-firebase-auth-checkout h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.woocommerce-firebase-auth-checkout p {
    margin-bottom: 15px;
}

.woocommerce-firebase-auth-notice {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-left: 4px solid #4285f4;
}

/* Password toggle */
.firebase-auth-password-wrapper {
    position: relative;
}

.firebase-auth-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #757575;
    font-size: 18px;
}

.firebase-auth-toggle-password:hover {
    color: #333;
}

.firebase-auth-toggle-password.showing {
    color: #4285f4;
}

/* Responsive styles */
@media (max-width: 600px) {
    .firebase-auth-container {
        padding: 15px;
    }
    
    .firebase-auth-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .firebase-auth-submit {
        width: 100%;
    }
    
    .firebase-auth-forgot-password {
        text-align: center;
    }
    
    .firebase-auth-profile-info {
        flex-direction: column;
        text-align: center;
    }
    
    .firebase-auth-profile-photo {
        margin-right: 0;
        margin-bottom: 15px;
    }
}
