/* === Modal Base === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 11000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin-top: 60px;
    background: #ffffff;
    width: 500px;
    max-width: 80%;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: fadeIn 0.3s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 11000;
}

/* === Botón Cerrar === */
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    color: #555;
    background: none;
    border: none;
    outline: none;
    transition: color 0.3s ease;
    z-index: 11000;
}

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

/* === Botones de apertura === */
button.modal-button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin: 5px;
}

button#open-login-modal {
    background-color: #0073e6;
    color: white;
}

button#open-register-modal {
    background-color: #28a745;
    color: white;
}

.modal-button-group {
    text-align: center;
}

.modal-button-wrapper {
    display: inline-block;
    margin: 10px;
}

/* === Títulos === */
.modal-content h2 {
    text-align: center;
    color: #222;
    margin-bottom: 10px;
    font-size: 24px;
}

.modal-content p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

/* === Formularios === */
form.custom-registration-form,
form.login {
    margin-top: 20px;
}

form.custom-registration-form p,
form.login p {
    margin-bottom: 16px;
}

form.custom-registration-form label,
form.login label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

form.custom-registration-form input,
form.login input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

form.custom-registration-form input:focus,
form.login input:focus {
    outline: none;
    border-color: #0073e6;
    background-color: #fff;
}

/* === Botón submit === */
form.custom-registration-form input[type="submit"],
form.login input[type="submit"] {
    background-color: #0073e6;
    color: white;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 30px auto 0;
    border: none;
}

form.custom-registration-form input[type="submit"]:hover,
form.login input[type="submit"]:hover {
    background-color: #005bb5;
}

/* === Checkbox alineado derecha === */
form.login .forgetmenot {
    text-align: right;
}

form.login .forgetmenot label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
}

/* === reCAPTCHA centrado === */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* === Mostrar contraseña === */
.toggle-password {
    margin-left: 6px;
    padding: 6px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

/* === Animación Modal === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Asegura que el modal esté encima de todo, incluso headers sticky */
body .modal {
    z-index: 999999 !important;
}

/* Fuerza que el header baje su z-index */
header,
.elementor-sticky--effects,
.site-header,
.admin-bar {
    z-index: 1000 !important;
}
