/* NB Cuestionarios — frontend */

.nbcu-wrap { max-width: 980px; margin: 0 auto; }

.nbcu-header h2 { margin: 0 0 4px; font-size: 24px; color: #1b5e20; }
.nbcu-sub { color: #555; font-size: 14px; margin: 0 0 20px; }

.nbcu-msg {
    padding: 12px 16px; border-radius: 8px; margin: 0 0 18px;
    font-size: 14px; border-left: 4px solid;
}
.nbcu-msg-exito  { background: #e8f5e9; border-color: #2e7d32; color: #1b5e20; }
.nbcu-msg-error  { background: #ffebee; border-color: #c62828; color: #b71c1c; }

/* Tabs navegación */
.nbcu-tabs {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}
.nbcu-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 8px;
    background: #f5f5f5; color: #333; text-decoration: none;
    font-size: 14px; font-weight: 600;
    border: 1.5px solid transparent;
    transition: all .15s ease;
    cursor: pointer;
    font-family: inherit;
}
.nbcu-tab:hover { background: #e0e0e0; }
.nbcu-tab-activo {
    background: #2e7d32; color: #fff; border-color: #1b5e20;
    box-shadow: 0 2px 8px rgba(27,94,32,0.3);
}
.nbcu-tab-activo:hover { background: #1b5e20; }
.nbcu-tab-activo.nbcu-tab-completado { background: #1b5e20; color: #fff; border-color: #0d3d14; }
.nbcu-tab-completado {
    background: #e8f5e9; color: #1b5e20; border-color: #43a047;
}
.nbcu-tab-bloqueado {
    background: #fafafa; color: #999; cursor: not-allowed;
}
.nbcu-tab-icon { font-size: 16px; line-height: 1; }

/* Secciones */
.nbcu-section {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 12px;
    padding: 24px; margin-bottom: 24px;
    scroll-margin-top: 20px;
}
.nbcu-sec-head h3 { margin: 0 0 4px; color: #1b5e20; font-size: 20px; }
.nbcu-sec-sub { color: #555; font-size: 13px; margin: 0 0 14px; }

.nbcu-badge {
    display: inline-block; padding: 6px 12px; border-radius: 6px;
    font-size: 13px; font-weight: 600; margin: 6px 0 14px;
}
.nbcu-badge-ok { background: #e8f5e9; color: #1b5e20; }
.nbcu-badge-bloqueado { background: #fff8e1; color: #e65100; }

/* Fieldsets */
.nbcu-fs {
    border: none; border-top: 1px solid #eee; margin: 18px 0 0;
    padding: 14px 0 0;
}
.nbcu-fs legend {
    font-size: 15px; font-weight: 700; color: #1b5e20;
    padding: 0 10px 0 0;
}
.nbcu-fs-sub { font-size: 12px; color: #666; margin: 2px 0 10px; }

.nbcu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 18px;
    margin-top: 10px;
    align-items: start;
}
@media (max-width: 900px) { .nbcu-grid { grid-template-columns: repeat(2, 1fr); } }
.nbcu-field { display: flex; flex-direction: column; justify-content: flex-start; }
.nbcu-field label {
    font-size: 13px; font-weight: 600; color: #333;
    margin-bottom: 4px;
    min-height: 2.6em;        /* reserva espacio para labels de 1 o 2 líneas */
    display: flex; align-items: flex-end;
    line-height: 1.3;
}

/* Subsección mini-header (usado p/ Actividad 1/2/3, Suplemento 1..5) */
.nbcu-subseccion {
    grid-column: 1 / -1;
    margin: 14px 0 4px;
    padding: 6px 0 4px;
    font-size: 14px; font-weight: 700; color: #1b5e20;
    border-top: 1px dashed #c8e6c9;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.nbcu-subseccion:first-child { border-top: none; margin-top: 4px; }
.nbcu-req { color: #c62828; margin-left: 2px; }

.nbcu-field input[type="text"],
.nbcu-field input[type="date"],
.nbcu-field textarea,
.nbcu-field select {
    width: 100%; padding: 8px 10px; font-size: 14px;
    border: 1px solid #ccd0d4; border-radius: 6px; background: #fff;
    font-family: inherit;
}
.nbcu-field textarea { resize: vertical; min-height: 60px; }
.nbcu-field-checkbox { flex-direction: row; align-items: center; gap: 8px; }
.nbcu-field-checkbox label { margin: 0; order: 2; cursor: pointer; }
.nbcu-field-checkbox input { margin: 0; order: 1; cursor: pointer; }
.nbcu-field-textarea { grid-column: 1 / -1; }

/* Acciones */
.nbcu-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid #eee;
    align-items: center;
}
.nbcu-btn {
    padding: 10px 18px; border-radius: 8px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .15s ease;
}
.nbcu-btn-parcial {
    background: #f5f5f5; color: #333; border: 1px solid #ccd0d4;
}
.nbcu-btn-parcial:hover { background: #e0e0e0; }
.nbcu-btn-completo {
    background: #2e7d32; color: #fff;
}
.nbcu-btn-completo:hover { background: #1b5e20; }
.nbcu-btn-completo:disabled {
    background: #c0c0c0; color: #777; cursor: not-allowed;
}
.nbcu-actions-nota { font-size: 12px; color: #666; margin: 0 0 0 10px; }

/* Banner persistente del cuestionario inicial (usado desde Área Premium) */
.nbcu-banner-inicial {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    border: 1.5px solid #f9a825; border-left-width: 6px;
    border-radius: 10px;
    padding: 14px 18px; margin: 0 0 20px;
    color: #5d4037; font-size: 14px; line-height: 1.4;
}
.nbcu-banner-icon { font-size: 24px; line-height: 1; }
.nbcu-banner-texto { flex: 1; }
.nbcu-banner-cta {
    background: #f9a825; color: #fff; padding: 8px 14px;
    border-radius: 6px; text-decoration: none; font-weight: 600;
    white-space: nowrap;
}
.nbcu-banner-cta:hover { background: #ef6c00; color: #fff; }

/* Mobile */
@media (max-width: 600px) {
    .nbcu-section { padding: 16px; }
    .nbcu-tabs { gap: 6px; }
    .nbcu-tab { padding: 8px 10px; font-size: 13px; }
    .nbcu-grid { grid-template-columns: 1fr; }
    .nbcu-banner-inicial { flex-direction: column; align-items: flex-start; }
    .nbcu-banner-cta { align-self: stretch; text-align: center; }
}

/* ======================================================
   Modal POP-UP del cuestionario inicial (auto-abierto)
   ====================================================== */
.nbcu-modal-inicial {
    position: fixed; inset: 0; z-index: 10050;
    display: flex; align-items: center; justify-content: center;
}
.nbcu-modal-inicial.nbcu-closed { display: none; }
.nbcu-modal-inicial-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.75);
}
.nbcu-btn-full { width: 100%; padding: 14px 22px; font-size: 15px; }
.nbcu-modal-inicial-dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 620px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px 28px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
}
.nbcu-modal-inicial-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.nbcu-modal-inicial-head h3 {
    margin: 0; color: #1b5e20; font-size: 22px;
}
.nbcu-modal-inicial-close {
    background: transparent; border: none; font-size: 30px; line-height: 1;
    color: #999; cursor: pointer; padding: 0 4px;
}
.nbcu-modal-inicial-close:hover { color: #000; }
.nbcu-modal-inicial-sub {
    color: #555; font-size: 14px; margin: 0 0 20px; line-height: 1.5;
}
.nbcu-modal-inicial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px 18px;
}
.nbcu-modal-inicial-grid .nbcu-field label {
    font-size: 13px; font-weight: 600; color: #333; margin-bottom: 4px;
    display: block;
}
.nbcu-modal-inicial-grid .nbcu-field input,
.nbcu-modal-inicial-grid .nbcu-field select,
.nbcu-modal-inicial-grid .nbcu-field textarea {
    width: 100%; padding: 8px 10px; font-size: 14px;
    border: 1px solid #ccd0d4; border-radius: 6px;
    font-family: inherit;
}
.nbcu-modal-inicial-grid .nbcu-field textarea { min-height: 54px; resize: vertical; }
.nbcu-modal-inicial-actions {
    display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
    margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee;
}
.nbcu-modal-inicial-nota {
    font-size: 12px; color: #888; margin: 12px 0 0; text-align: center;
}
@media (max-width: 600px) {
    .nbcu-modal-inicial-dialog { padding: 18px; }
    .nbcu-modal-inicial-grid { grid-template-columns: 1fr; }
    .nbcu-modal-inicial-actions { justify-content: stretch; }
    .nbcu-modal-inicial-actions .nbcu-btn { flex: 1; }
}

/* ======================================================
   Info banners (amarillo warning / azul info)
   ====================================================== */
.nbcu-info-banner {
    grid-column: 1 / -1;
    padding: 12px 16px; border-radius: 8px; font-size: 14px;
    line-height: 1.5; border-left: 5px solid;
    margin: 6px 0 2px;
}
.nbcu-info-banner-warning {
    background: #fff8e1; border-color: #f9a825; color: #5d4037;
    font-weight: 600;
}
.nbcu-info-banner-info {
    background: #e3f2fd; border-color: #1976d2; color: #0d47a1;
}

/* ======================================================
   Sí / No con detalle (radio-style buttons)
   ====================================================== */
.nbcu-field-si_no_detalle { grid-column: 1 / -1; }
.nbcu-field-full { grid-column: 1 / -1; }
.nbcu-sinodet-buttons {
    display: inline-flex; gap: 6px; margin: 4px 0;
}
.nbcu-sinodet-btn {
    padding: 8px 20px; font-size: 14px; font-weight: 600;
    border: 1.5px solid #ccd0d4; background: #fff; color: #555;
    border-radius: 6px; cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
}
.nbcu-sinodet-btn:hover { border-color: #2e7d32; color: #1b5e20; }
.nbcu-sinodet-btn.active {
    background: #2e7d32; color: #fff; border-color: #1b5e20;
}
.nbcu-sinodet-detalle { margin-top: 8px; }
.nbcu-sinodet-detalle input[type="text"] {
    width: 100%; padding: 8px 10px; font-size: 14px;
    border: 1px solid #ccd0d4; border-radius: 6px;
    font-family: inherit;
}

/* ======================================================
   Popup "Gracias por completar"
   ====================================================== */
.nbcu-popup-gracias {
    position: fixed; inset: 0; z-index: 10060;
    display: flex; align-items: center; justify-content: center;
}
.nbcu-popup-gracias-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.65);
}
.nbcu-popup-gracias-dialog {
    position: relative; background: #fff; border-radius: 14px;
    max-width: 520px; width: calc(100% - 32px);
    padding: 28px 32px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
    text-align: center;
}
.nbcu-popup-gracias-dialog h3 {
    margin: 0 0 12px; color: #1b5e20; font-size: 22px;
}
.nbcu-popup-gracias-dialog p {
    margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: #333;
}
.nbcu-popup-gracias-dialog .nbcu-btn {
    min-width: 160px; padding: 12px 22px; font-size: 15px;
}
