/* Estilo tipo backend + bloques .sec-* y responsive */

.sec-wrap,
.wrap {
    box-sizing: border-box;
}

/* Contenedor principal estilo admin */
.wrap {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px 40px;
    background: #f0f0f1;
}

/* Títulos tipo backend */
.wrap h1 {
    font-size: 24px;
    line-height: 1.3;
    margin: 20px 0;
    font-weight: 600;
}

/* Separadores */
.wrap hr {
    border: 0;
    border-top: 1px solid #dcdcde;
    margin: 25px 0;
}

/* Formulario tipo backend */
.form-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
}
.form-table th {
    width: 220px;
    padding: 10px 10px 10px 0;
    text-align: left;
    vertical-align: top;
    font-weight: 600;
}
.form-table td {
    padding: 8px 10px;
    vertical-align: top;
}
.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="number"],
.form-table input[type="date"],
.form-table input[type="url"],
.form-table select {
    width: 100%;
    max-width: 400px;
    padding: 6px 8px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    box-shadow: 0 0 0 transparent;
    font-size: 14px;
}

/* Botones tipo backend */
.button,
button,
input[type="button"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 13px;
    line-height: 2;
    border-radius: 3px;
    border: 1px solid #2271b1;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.button-secondary {
    background: #f6f7f7;
    color: #1d2327;
    border-color: #8c8f94;
}
.button-secondary:hover {
    background: #e4e7ea;
}

/* Dashicons alineados */
.button .dashicons,
button .dashicons {
    line-height: 1;
}

/* Tabla tipo backend */
.widefat {
    border-spacing: 0;
    width: 100%;
    border: 1px solid #c3c4c7;
    background: #fff;
    border-radius: 3px;
}
.widefat th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #c3c4c7;
    background: #f3f4f5;
    font-weight: 600;
    white-space: nowrap;
}
.widefat td {
    padding: 8px 10px;
    border-bottom: 1px solid #dcdcde;
    vertical-align: top;
    font-size: 13px;
}
.widefat.striped tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Enlaces */
.widefat a {
    color: #2271b1;
    text-decoration: none;
}
.widefat a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Notificaciones */
.notice {
    margin: 15px 0;
    padding: 10px 12px;
    border-left: 4px solid #72aee6;
    background: #fff;
}
.notice-success {
    border-left-color: #00a32a;
}
.notice-error {
    border-left-color: #d63638;
}

/* Responsive */
@media (max-width: 960px) {
    .wrap {
        margin: 15px auto;
        padding: 0 10px 20px;
    }
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
    }
    .form-table th {
        padding-bottom: 4px;
    }
    .form-table td {
        padding-top: 0;
    }
}
@media (max-width: 782px) {
    .widefat {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Bloques .sec-* (completar / firma) */
.sec-wrap {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
}
.sec-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px 20px 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border: 1px solid #dcdcde;
}
.sec-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

/* Alertas */
.sec-alert {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}
.sec-alert-success {
    background: #dff0d8;
    border: 1px solid #c2e0b7;
}
.sec-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
}

/* Formularios sec */
.sec-form p {
    margin-bottom: 12px;
}
.sec-form input[type="text"],
.sec-form input[type="email"],
.sec-form input[type="number"],
.sec-form input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    box-sizing: border-box;
    font-size: 14px;
}

/* Grid edad/tutor */
.sec-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sec-grid > p {
    flex: 1 1 160px;
}

/* Botones sec */
.sec-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 4px;
    border: 1px solid transparent;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}
.sec-btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
.sec-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}
.sec-btn-secondary {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #1d2327;
}
.sec-btn-secondary:hover {
    background: #e4e7ea;
}

/* Firma canvas */
.sec-firma-wrapper {
    width: 100%;
    max-width: 600px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
#sec-firma-canvas {
    width: 100%;
    height: 200px;
    display: block;
}

/* Bloques consentimientos */
.sec-consent-block {
    margin-bottom: 10px;
}

/* Extra para fila detalle participantes */
.sec-part-extra td {
    background: #f7f7f7;
    font-size: 12px;
}



/* ======================================
   FIX VISIBILIDAD PANEL EN FRONTEND
====================================== */

.wrap,
.wrap * {
    color: #222 !important;
}

/* Formularios */
.wrap .form-table th {
    color: #2c3e50 !important;
    font-weight: 600;
}

.wrap .form-table td {
    background: #f4f8fb !important;
}

/* Inputs */
.wrap input[type="text"],
.wrap input[type="email"],
.wrap input[type="date"],
.wrap select {
    background: #ffffff !important;
    color: #222 !important;
    border: 1px solid #ccd0d4 !important;
}

/* Tabla */
.wrap .widefat {
    background: #ffffff !important;
    border: 1px solid #ccd0d4 !important;
}

.wrap .widefat th {
    background: #e9f1f8 !important;
    color: #222 !important;
    font-weight: 600;
}

.wrap .widefat td {
    background: #ffffff !important;
    color: #222 !important;
}

/* Botones */
.wrap .sec-copy-link {
    background: #8aa63b !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
}

.wrap .button-link-delete {
    color: #b32d2e !important;
    font-weight: 600 !important;
}


/* 🛠 Forzar visibilidad de checkboxes en consentimientos */
.sec-form input[type="checkbox"],
.sec-form input[type="radio"] {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    position: static !important;
    margin-right: 8px;
    accent-color: #000;
}




/* Bloque de cada participante */
.sec-item {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
}

/* Mejor separación visual interna */
.sec-item p {
    margin-bottom: 12px;
}

/* Grid más aireado */
.sec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* En móvil: todo en columna */
@media (max-width: 768px) {
    .sec-grid {
        grid-template-columns: 1fr;
    }
}



/* ===============================
   HR – AJUSTE ESPACIADO
================================ */
.sec-firma-consentimientos hr {
  margin: 12px 0;     /* antes seguramente 40px o más */
  border: none;
  border-top: 1px solid #ddd;
}

/* ===============================
   H3 – AJUSTE ESPACIADO
================================ */
.sec-firma-consentimientos h3 {
  margin-top: 32px !important;
  margin-bottom: 8px !important;
}



/* ===============================
   TEXTO LEGAL DESPLEGABLE
   =============================== */

.sec-texto-legal {
    margin: 20px 0;
    padding: 15px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Contenido recortado a ~4 líneas */
.sec-texto-legal-contenido {
    max-height: 6.8em; /* ≈ 4 líneas reales */
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Estado abierto */
.sec-texto-legal.abierto .sec-texto-legal-contenido {
    max-height: 3000px; /* suficiente para todo el texto */
}

/* Botón toggle */
.sec-texto-legal-toggle {
    margin-top: 8px;
    background: none;
    border: none;
    padding: 0;
    color: #0073aa;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.sec-texto-legal-toggle:hover {
    text-decoration: underline;
}

/* Espaciado correcto de HTML interno */
.sec-texto-legal-contenido p {
    margin: 0 0 10px;
}

.sec-texto-legal-contenido ul {
    margin: 0 0 10px 20px;
    padding: 0;
}

.sec-texto-legal-contenido li {
    margin-bottom: 6px;
}
.sec-texto-legal a {
    color: #808b90!important;
    text-decoration: underline;
}

.sec-texto-legal a:hover {
    text-decoration: none;
	
}

.sec-texto-legal-resumen button.sec-toggle-legal {
    padding: 10px;
    border-radius: 4px;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
}

button.sec-texto-legal-toggle {
    padding: 10px 12px !important;
}



/* Enlaces dentro de los consentimientos (privacidad, normas, etc.) */
.sec-consent-block a {
    color: #2271b1 !important;   /* azul WordPress */
    text-decoration: underline;
}

.sec-consent-block a:hover {
    color: #135e96 !important;
    text-decoration: none;
}
