/* ==========================================================
   1. POP-UP DE LOGIN Y MODALES
   ========================================================== */
div.modal-content, div.modal-body { 
    background-color: #ffffff !important; 
}

.modal-body label, .modal-body p, .modal-body div { 
    color: #000000 !important; 
}

.modal-body button.btn-primary, .modal-body .btn-primary {
    background-color: #ffffff !important;
    color: #004b8d !important;
    border: 2px solid #004b8d !important;
    font-weight: bold !important;
    padding: 10px 20px !important;
}

button.close, .modal-header .close {
    background: none !important;
    color: #000000 !important;
    font-size: 28px !important;
    opacity: 1 !important;
    border: none !important;
}

/* ==========================================================
   2. BOTONES Y PÁGINA DE REGISTRO
   ========================================================== */
.page_register .btn-primary, 
.form-group-buttons button.btn-primary,
.pkp_button.submitFormButton,
.pkp_button[name="save"] {
    background-color: #004b8d !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
}

/* ==========================================================
   3. MENÚ DESPLEGABLE (TOP BAR)
   ========================================================== */
.dropdown-menu .dropdown-item { 
    color: #ffffff !important; 
    font-weight: 500 !important; 
    padding: 10px 20px !important; 
}

.dropdown-menu .dropdown-item:hover { 
    background-color: rgba(0, 0, 0, 0.1) !important; 
}

/* ==========================================================
   4. PANTALLA REVISOR/A Y LAYOUT
   ========================================================== */
.pkp_page_reviewer .pkp_page_content { max-width: 980px; }

.pkp_page_reviewer ol {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 14px 18px;
}

.pkp_page_reviewer table {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

/* ==========================================================
   5. PRIVACIDAD (SOLUCIÓN BLINDADA - DIBUJO MANUAL)
   ========================================================== */

/* Forzamos visibilidad de los contenedores que Brave oculta */
ul.checkbox_and_radiobutton, 
ul.checkbox_and_radiobutton li,
.optin-privacy {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* El input original: lo hacemos GIGANTE e INVISIBLE sobre el texto.
   Así, aunque el navegador lo "borre", el área clickable sigue ahí. */
input#privacyConsent, 
input[name="privacyConsent"],
input[type="checkbox"].field.checkbox {
    all: unset !important;
    display: block !important;
    visibility: visible !important;
    opacity: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10 !important;
    cursor: pointer !important;
}

/* El Label: Le damos espacio para nuestro nuevo cuadro azul */
.checkbox_and_radiobutton label,
label[for="privacyConsent"],
.optin-privacy label {
    position: relative !important;
    display: inline-block !important;
    padding-left: 35px !important;
    cursor: pointer !important;
    min-height: 25px !important;
    visibility: visible !important;
}

/* Dibujamos el cuadrado azul (Checkbox falso que el navegador no detecta) */
.checkbox_and_radiobutton label::before,
label[for="privacyConsent"]::before,
.optin-privacy label::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 22px !important;
    height: 22px !important;
    border: 2px solid #004b8d !important;
    background-color: #ffffff !important;
    border-radius: 4px !important;
    z-index: 1 !important;
    visibility: visible !important;
}

/* Dibujamos el tilde azul al seleccionar */
input:checked + label::after,
label:has(input:checked)::after {
    content: "" !important;
    position: absolute !important;
    left: 8px !important;
    top: 4px !important;
    width: 6px !important;
    height: 12px !important;
    border: solid #004b8d !important;
    border-width: 0 3px 3px 0 !important;
    transform: rotate(45deg) !important;
    z-index: 2 !important;
    visibility: visible !important;
}

/* ==========================================================
   6. AJUSTES VISTA AUTOR (NOTIFICACIÓN ROJA)
   ========================================================== */

/* Cartel "No cargue archivos" solicitado por el cliente */
#submissionFilesForm p:first-of-type, 
.pkp_notification.instruction,
.upload_file_instructions {
    color: #cc0000 !important;
    font-weight: bold !important;
    font-size: 1.4em !important;
    border: 3px solid #cc0000 !important;
    padding: 15px !important;
    background-color: #fff5f5 !important;
    border-radius: 8px !important;
    text-align: center !important;
    margin: 20px 0 !important;
}

/* ==========================================================
   1. ESTILOS GENERALES Y LOGIN
   ========================================================== */
div.modal-content, div.modal-body { background-color: #ffffff !important; }
.modal-body label, .modal-body p { color: #000000 !important; }
.modal-body button.btn-primary { 
    background-color: #ffffff !important; 
    color: #004b8d !important; 
    border: 2px solid #004b8d !important; 
}

/* ==========================================================
   2. BOTONES ACARO
   ========================================================== */
.btn-primary, .pkp_button.submitFormButton {
    background-color: #004b8d !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
}

/* ==========================================================
   3. CARTEL ROJO "NO CARGUE ARCHIVOS" (SOLICITUD CLIENTE)
   ========================================================== */
#submissionFilesForm p:first-of-type, 
.pkp_notification.instruction {
    color: #cc0000 !important;
    font-weight: bold !important;
    font-size: 1.4em !important;
    border: 3px solid #cc0000 !important;
    padding: 15px !important;
    background-color: #fff5f5 !important;
    border-radius: 8px !important;
    text-align: center !important;
    margin: 20px 0 !important;
}

/* ==========================================================
   4. PRIVACIDAD: CAMUFLAJE PARA QUE EL CHECK SE VEA
   ========================================================== */

/* Forzamos que el contenedor sea visible */
.checkbox_and_radiobutton, .optin-privacy {
    display: block !important;
    visibility: visible !important;
}

/* Hacemos el checkbox original un poco más grande para que sea fácil de clickear */
input[type="checkbox"]#privacyConsent {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    display: inline-block !important;
    visibility: visible !important;
    margin-right: 10px !important;
}

/* Estilo para el texto de advertencia que vas a agregar */
/* Si le pones una clase como "adv-browser" en el editor HTML, puedes usar esto: */
.advertencia-browser {
    display: block;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-style: italic;
}
/* ELIMINAR OPCIÓN DE NOTIFICACIONES POR EMAIL */
#emailConsent, 
label[for="emailConsent"], 
.optin-email {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

/* Por si queda algún contenedor residual del formulario */
.form-check:has(#emailConsent) {
    display: none !important;
}

