/* ============================================================
 * Escuelas de Golf - Información — estilos públicos
 * Todo está scopeado a .egd-app para no contaminar el tema,
 * y con reglas defensivas para que Astra y otros temas no
 * sobrescriban los estilos del plugin.
 * ============================================================ */

.egd-app{
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
    color:#1f2937;
    width:100%;
    margin:0 auto;
    padding:0;
    line-height:1.5;
    box-sizing:border-box;
}
.egd-app *,.egd-app *::before,.egd-app *::after{box-sizing:border-box}

/* Reset defensivo: Astra y muchos temas estilan <a>, <h2>, <h3>, <p> globalmente */
.egd-app a{text-decoration:none !important;color:inherit;box-shadow:none !important}
.egd-app a:hover{text-decoration:none !important}
.egd-app a.egd-card{text-decoration:none !important;color:inherit !important;border:1px solid #e5e7eb}
.egd-app h2,.egd-app h3,.egd-app h4{margin:0;padding:0;color:#111827;font-weight:600;line-height:1.3}
.egd-app p{margin:0 0 .75em;line-height:1.5}
.egd-app button{font-family:inherit;cursor:pointer}
.egd-app input,.egd-app select,.egd-app textarea,.egd-app button{font-family:inherit;font-size:14px}

.egd-box{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:8px;
    padding:24px;
    margin-bottom:20px;
    box-shadow:0 1px 2px rgba(0,0,0,.03);
}
.egd-greeting h2{margin-top:0;font-weight:600;color:#111827;font-size:22px}
.egd-h2{margin:30px 0 6px;font-weight:600;color:#111827;font-size:20px}
.egd-h2-sub{color:#6b7280;margin:0 0 18px;font-size:14px}
.egd-intro{color:#4b5563;margin-bottom:18px;font-size:14px;font-style:normal}
.egd-notice{display:flex;align-items:center;gap:15px;background:#fef3c7;flex-wrap:wrap}
.egd-error{background:#fee2e2;color:#991b1b;padding:10px 14px;border-radius:6px;margin:10px 0;font-size:14px}
.egd-success{padding:12px 16px;border-radius:6px;margin:15px 0;font-size:14px;border-left:3px solid}
.egd-success-ok{background:#ecfdf5;color:#065f46;border-color:#10b981}
.egd-success-draft{background:#fffbeb;color:#92400e;border-color:#f59e0b}

/* ===================== FORMULARIOS — REDISEÑO PROFESIONAL ===================== */

/* Bloque general de datos (arriba del form) */
.egd-general-block{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    padding:14px 18px;
    border-radius:8px;
    margin-bottom:28px;
    font-size:13.5px;
    color:#475569;
    line-height:1.5;
}
.egd-general-block strong{color:#334155}

/* Cabecera de sección — clara, con separación generosa */
.egd-app .egd-section,
.egd-section{
    margin:40px 0 28px !important;
    padding:0 0 14px 0 !important;
    border-bottom:2px solid #e5e7eb !important;
    font-size:16px !important;
    font-weight:700 !important;
    color:#0f172a !important;
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    letter-spacing:.2px !important;
    text-transform:none !important;
}
.egd-app .egd-section:first-of-type{margin-top:14px !important}
.egd-section-num{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;height:30px;
    background:#0f766e;
    color:#fff !important;
    border-radius:50%;
    font-size:13px;
    font-weight:700;
    flex-shrink:0;
    box-shadow:0 1px 3px rgba(15,118,110,.25);
}

/* Espacio extra entre el header de sección y el primer contenido */
.egd-app .egd-section + .egd-grid-2,
.egd-app .egd-section + .egd-field{
    margin-top:8px !important;
}

/* Título de formulario (Formulario X — Nombre) — proporcionado */
.egd-app h2.egd-form-title,
body .egd-app h2.egd-form-title,
.entry-content .egd-app h2.egd-form-title{
    font-size:22px !important;
    font-weight:700 !important;
    line-height:1.25 !important;
    color:#0f172a !important;
    margin:0 0 14px !important;
    padding:0 !important;
    letter-spacing:-0.01em !important;
    text-transform:none !important;
}
.egd-app .egd-intro{
    color:#475569 !important;
    font-size:14px !important;
    line-height:1.55 !important;
    margin:0 0 22px !important;
}

/* Sub-cabecera H4 (ej. en form de profesores) */
.egd-h4{margin:28px 0 12px;font-size:14px;color:#334155;font-weight:700;text-transform:uppercase;letter-spacing:.4px}

/* Field — espaciado generoso */
.egd-app .egd-form .egd-field{margin-bottom:24px}
.egd-app .egd-form label{
    display:block;
    font-weight:600;
    margin-bottom:10px;
    color:#1f2937;
    font-size:14px;
    line-height:1.5;
}

/* Inputs */
.egd-app .egd-form input[type=text],
.egd-app .egd-form input[type=number],
.egd-app .egd-form input[type=email],
.egd-app .egd-form input[type=password],
.egd-app .egd-form select,
.egd-app .egd-form textarea{
    width:100%;
    padding:10px 14px;
    border:1px solid #d1d5db;
    border-radius:6px;
    font-size:14px;
    background:#fff;
    color:#111827;
    line-height:1.4;
    height:auto;
    box-shadow:none;
    -webkit-appearance:none;
    appearance:none;
    transition:border-color .15s, box-shadow .15s;
}
.egd-app .egd-form select{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 111.08 1.04l-4.25 4.4a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 12px center;
    background-size:16px;
    padding-right:38px;
}
.egd-app .egd-form input:focus,
.egd-app .egd-form select:focus,
.egd-app .egd-form textarea:focus{
    outline:none;
    border-color:#0f766e;
    box-shadow:0 0 0 3px rgba(15,118,110,.12);
}
.egd-app .egd-form textarea{resize:vertical;min-height:72px}

.egd-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.egd-field-wide{grid-column:1/-1}
@media(max-width:640px){.egd-grid-2{grid-template-columns:1fr;gap:16px}}

/* Label de pregunta (separación clara con las opciones) */
.egd-q{
    display:block;
    font-weight:600;
    margin-bottom:12px;
    color:#0f172a;
    font-size:14px;
    line-height:1.5;
}

/* Opciones (radios/checkboxes) — agrupadas como pills */
.egd-options{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.egd-radio{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:9px 16px;
    background:#fff;
    border:1.5px solid #d1d5db;
    border-radius:100px;
    font-size:13.5px;
    color:#374151;
    cursor:pointer;
    transition:all .15s;
    line-height:1.2;
    font-weight:500;
}
.egd-radio:hover{
    border-color:#0f766e;
    background:#f0fdfa;
}
.egd-radio input[type=radio],
.egd-radio input[type=checkbox]{
    margin:0;
    accent-color:#0f766e;
    cursor:pointer;
}
.egd-radio:has(input:checked){
    background:#0f766e;
    color:#fff;
    border-color:#0f766e;
    box-shadow:0 1px 3px rgba(15,118,110,.3);
}
.egd-radio:has(input:checked) input{accent-color:#fff}

/* Bloques de campo agrupados (numericos en grid) */
.egd-app .egd-form .egd-field.egd-opt,
.egd-app .egd-form .egd-field.egd-sino{
    padding:16px 18px;
    background:#fafbfc;
    border:1px solid #eef0f3;
    border-radius:8px;
    margin-bottom:14px;
}
.egd-app .egd-form .egd-field.egd-opt:hover,
.egd-app .egd-form .egd-field.egd-sino:hover{
    border-color:#e2e8f0;
    background:#fff;
}

/* Footer del form */
.egd-form-actions{
    margin-top:36px;
    padding-top:24px;
    border-top:1px solid #e5e7eb;
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    align-items:center;
}

/* Botones — pisan estilos de tema */
.egd-app .egd-btn{
    display:inline-block;
    padding:9px 18px;
    background:#fff;
    border:1px solid #d1d5db;
    border-radius:5px;
    cursor:pointer;
    text-decoration:none !important;
    color:#374151 !important;
    font-size:14px;
    font-weight:500;
    line-height:1.4;
    transition:background .12s,border-color .12s;
    box-shadow:none;
    text-shadow:none;
    text-transform:none;
    letter-spacing:normal;
}
.egd-app .egd-btn:hover{background:#f9fafb;border-color:#9ca3af;color:#111827 !important}
.egd-app .egd-btn-primary{background:#0f766e;color:#fff !important;border-color:#0f766e}
.egd-app .egd-btn-primary:hover{background:#115e59;color:#fff !important;border-color:#115e59}
.egd-app .egd-btn-link{background:none;border:none;color:#6b7280;cursor:pointer;font-size:13px;padding:0;text-decoration:none}
.egd-app .egd-btn-link:hover{color:#374151;text-decoration:underline}
.egd-actions{display:flex;gap:10px;margin-top:30px;padding-top:22px;border-top:1px solid #e5e7eb;flex-wrap:wrap}
.egd-back{display:inline-block;margin-bottom:14px;color:#6b7280!important;text-decoration:none!important;font-size:13px}
.egd-back:hover{color:#374151!important;text-decoration:underline!important}

/* Cards del panel */
.egd-cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:14px;
    margin-top:8px;
}
.egd-app a.egd-card{
    display:flex !important;
    background:#fff !important;
    border:1px solid #e5e7eb !important;
    border-radius:8px !important;
    overflow:hidden !important;
    text-decoration:none !important;
    color:inherit !important;
    transition:border-color .15s,box-shadow .15s,transform .15s;
}
.egd-app a.egd-card:hover{
    border-color:var(--egd-card-color) !important;
    box-shadow:0 4px 12px rgba(0,0,0,.06);
    transform:translateY(-1px);
    text-decoration:none !important;
}
.egd-card-side{
    width:48px;
    background:var(--egd-card-color,#0f766e);
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}
.egd-card-num{
    color:#fff !important;
    font-weight:700;
    font-size:16px;
    letter-spacing:.5px;
    text-decoration:none !important;
}
.egd-card-body{
    padding:14px 16px;
    flex:1;
    display:flex;
    flex-direction:column;
    gap:4px;
    min-width:0;
}
.egd-card-eyebrow{
    font-size:11px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.6px;
    color:#9ca3af !important;
    text-decoration:none !important;
}
.egd-card-title{
    margin:2px 0 0 !important;
    font-size:15px !important;
    font-weight:600 !important;
    color:#111827 !important;
    line-height:1.3;
    text-decoration:none !important;
    padding:0 !important;
    border:none !important;
}
.egd-card-sub{
    margin:0 0 8px !important;
    font-size:12px;
    color:#6b7280 !important;
    text-decoration:none !important;
}

/* Badges */
.egd-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:3px 9px;
    border-radius:99px;
    font-size:11px;
    font-weight:600;
    align-self:flex-start;
    letter-spacing:.2px;
    text-decoration:none !important;
}
.egd-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}
.egd-badge-ok{background:#ecfdf5;color:#065f46}
.egd-badge-ok .egd-dot{background:#10b981}
.egd-badge-draft{background:#fffbeb;color:#92400e}
.egd-badge-draft .egd-dot{background:#f59e0b}
.egd-badge-todo{background:#f3f4f6;color:#6b7280}
.egd-badge-todo .egd-dot{background:#9ca3af}

/* Profesores */
.egd-profesor-block{
    background:#fafafa;
    border:1px solid #e5e7eb;
    border-left:3px solid #9f1239;
    border-radius:6px;
    padding:18px;
    margin-bottom:14px;
}
.egd-prof-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.egd-prof-head strong{color:#374151;font-size:14px}
.egd-prof-group{margin:18px 0 8px;color:#475569;font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}
.egd-help{color:#6b7280;font-size:13px;margin-bottom:14px}

/* Reportes */
.egd-table{width:100%;border-collapse:collapse;margin:10px 0 20px}
.egd-table th,.egd-table td{padding:10px 12px;border-bottom:1px solid #e5e7eb;text-align:left;font-size:14px}
.egd-table th{background:#f8fafc;font-weight:600;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.3px}
.egd-filters{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 20px}
.egd-filters select{padding:7px 10px;border:1px solid #d1d5db;border-radius:5px;font-size:14px;background:#fff}
.egd-dist{margin-bottom:18px;padding:12px 14px;background:#f8fafc;border-radius:6px}
.egd-dist strong{display:block;margin-bottom:8px;color:#334155;font-size:14px}
.egd-bar-row{display:grid;grid-template-columns:1fr 2fr 100px;gap:10px;align-items:center;margin:4px 0;font-size:13px}
.egd-bar{display:block;height:10px;background:#e5e7eb;border-radius:5px;overflow:hidden}
.egd-bar span{display:block;height:100%;background:#0f766e;border-radius:5px}
.egd-bar-val{color:#475569;font-size:12px}
.egd-open{background:#f8fafc;padding:14px;border-radius:6px;margin-bottom:14px}
.egd-open ul{margin:8px 0 0;padding-left:18px;list-style:disc}
.egd-open li{margin-bottom:8px;font-size:14px;line-height:1.5}
.egd-open em{color:#6b7280;font-size:12px;font-style:italic}

.egd-login-box{max-width:420px;margin:0 auto}
.egd-toggle-general{color:#0f766e !important;text-decoration:underline !important;font-size:13px}

/* ===== Editor de preguntas ===== */
.egd-editor{width:100%}
.egd-editor h2{font-size:20px;font-weight:600;margin-bottom:8px}
.egd-editor-help{background:#f8fafc;border-left:3px solid #0f766e;padding:12px 14px;border-radius:0 6px 6px 0;font-size:13px;color:#475569;margin-bottom:18px;line-height:1.5}
.egd-editor-msg{margin:12px 0 18px}
.egd-editor-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid #e5e7eb;margin-bottom:20px}
.egd-editor-tab{padding:8px 14px;border:1px solid #e5e7eb;border-bottom:none;background:#f8fafc;border-radius:6px 6px 0 0;font-size:13px;color:#475569 !important;text-decoration:none !important;margin-bottom:-1px}
.egd-editor-tab.is-active{background:#fff;color:#0f766e !important;border-bottom:1px solid #fff;font-weight:600}
.egd-editor-tab:hover{background:#fff;color:#0f766e !important}
.egd-editor-h3{margin:24px 0 12px;font-size:15px;font-weight:600;color:#111827;padding-bottom:6px;border-bottom:1px solid #e5e7eb}
.egd-editor-h4{margin:18px 0 8px;font-size:13px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px}
.egd-editor-row{margin-bottom:14px}
.egd-editor-row label{display:block;font-size:12px;color:#475569;margin-bottom:4px;font-weight:500}
.egd-editor-row label code{background:#f1f5f9;color:#0f766e;padding:1px 6px;border-radius:3px;font-size:11px;font-weight:400}
.egd-editor-row input[type=text],.egd-editor-row textarea{width:100%;padding:8px 10px;border:1px solid #d1d5db;border-radius:5px;font-size:14px;background:#fff;color:#111827}
.egd-editor-row small{display:block;color:#9ca3af;font-size:11px;margin-top:3px;font-style:italic}
.egd-editor-block{background:#fafafa;border:1px solid #e5e7eb;border-radius:6px;padding:14px;margin-bottom:14px}
.egd-editor-options{margin-top:10px;padding-top:10px;border-top:1px dashed #e5e7eb}
.egd-editor-options strong{display:block;font-size:12px;color:#475569;margin-bottom:8px}
.egd-editor-option-row{margin-bottom:8px}
.egd-editor-option-row input{width:100%;padding:6px 10px;border:1px solid #d1d5db;border-radius:4px;font-size:13px}
.egd-editor-actions{margin-top:24px;padding-top:20px;border-top:1px solid #e5e7eb}


/* ===================== UNIFORMIDAD VISUAL (titulos + ancho) ===================== */
.egd-app {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
/* TODOS los títulos principales H2 de cualquier shortcode quedan iguales: mayúsculas + 18px */
.egd-app h2,
.egd-app .egd-h2,
.egd-app .egd-page-title,
body .egd-app h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
/* Excepción: títulos de formulario y sección NO en mayúsculas (son contenido, no UI chrome) */
.egd-app h2.egd-form-title,
body .egd-app h2.egd-form-title,
.egd-app h3.egd-section,
body .egd-app h3.egd-section{
    text-transform: none !important;
    letter-spacing: normal !important;
}
.egd-app h2.egd-form-title{
    font-size: 22px !important;
}
.egd-app h3.egd-section{
    font-size: 16px !important;
}
.egd-app h3,
.egd-app .egd-h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    margin-top: 22px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
}
.egd-app h4,
.egd-app .egd-h4 {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    margin-top: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

/* ===================== EMERGENCIA: pisa a Astra/Elementor con máxima especificidad ===================== */
/* Título del formulario individual */
html body .entry-content .egd-app h2.egd-form-title,
html body .ast-article-single .egd-app h2.egd-form-title,
.egd-app h2.egd-form-title.egd-form-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #0f172a !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
}

/* Headers de sección dentro del form */
html body .entry-content .egd-app h3.egd-section,
html body .ast-article-single .egd-app h3.egd-section,
.egd-app h3.egd-section.egd-section {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin: 40px 0 28px !important;
    padding: 0 0 14px !important;
    border-bottom: 2px solid #e5e7eb !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Asegurar separación entre header de sección y primer field */
.egd-app h3.egd-section + .egd-grid-2,
.egd-app h3.egd-section + .egd-field,
.egd-app h3.egd-section + div {
    margin-top: 14px !important;
}

/* Títulos de páginas dashboard (REPORTES DE FORMULARIOS, etc) — solo los que tengan clase específica */
html body .entry-content .egd-app h2.egd-page-title,
.egd-app h2.egd-page-title.egd-page-title {
    font-size: 18px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
}

/* Logo de club en listados */
.egd-app .egd-club-tag { line-height:1.3; }
.egd-app .egd-club-name-strong { font-weight:700; color:#0f172a; }
