/* Modal Styles for Login and Registration */
.modal-container {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    transition: opacity 0.3s ease;
}

/* Ensure proper stacking without z-index conflicts */
#modal-login-container.active, 
#modal-register-container.active {
    z-index: 1000000; /* Higher z-index when active */
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    width: 350px;
    max-width: 90%;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s;
}

#modal-register-container .modal-content {
    width: 400px; /* Slightly wider for the registration form */
}

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

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

.modal-close:hover {
    color: #333;
}

.modal-header {
    padding: 15px 20px 0;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 0 20px 15px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding-top: 15px;
}

#modal-login-form-element p,
#modal-register-form-element p {
    margin-bottom: 15px;
}

#modal-login-form-element label,
#modal-register-form-element label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#modal-login-form-element .input,
#modal-register-form-element .input {
    width: 100%;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#modal-login-form-element .forgetmenot {
    display: flex;
    align-items: center;
}

#modal-login-form-element .forgetmenot input {
    margin-right: 5px;
}

#modal-wp-submit,
#modal-register-submit {
    width: 100%;
    padding: 8px;
/*    background-color: #0073aa; */
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 500;
}

#modal-wp-submit:hover,
#modal-register-submit:hover {
    background-color: #005d8c;
}

#modal-login-messages,
#modal-register-messages {
    margin-bottom: 15px;
}

#modal-login-messages .message,
#modal-register-messages .message {
    padding: 10px;
    border-radius: 3px;
    font-size: 14px;
}

.message.info {
    background-color: #e7f5ff;
    border: 1px solid #b3d7ff;
    color: #004085;
}

.message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.modal-footer a {
    margin: 0 5px;
    color: #0073aa;
    text-decoration: none;
}

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

/* Required field indicator */
.required {
    color: #cc0000;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 15% auto;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    #modal-login-form-element .input,
    #modal-register-form-element .input {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Styling similar to WordPress admin modal */
@media screen and (min-width: 768px) {
    #modal-login-container .modal-content {
        width: 350px;
    }
    
    #modal-register-container .modal-content {
        width: 400px;
    }
}

/* Hide any remaining form fields in the OneAll section */
.oneall-social-login p:not(.oneall_social_login_providers) {
    display: none;
}

/* Hide any potential submit buttons from OneAll that might duplicate functionality */
.oneall-social-login input[type="submit"] {
    display: none;
}

/* Make sure OneAll buttons are centered and properly spaced */
.oneall-social-login .oneall_social_login {
    margin: 0 auto;
    padding: 10px 0;
    text-align: center;
}

.oneall-social-login .oneall_social_login_providers {
    margin: 0 auto;
    display: inline-block;
}

/* Fix the OR divider to ensure proper spacing */
.login-or-divider {
    margin: 20px 0 15px;
}