/* ================================
   SMBT Filters (Edición / Categoría / Aprobado)
   ================================ */

.smbt-insc-filters{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin:0 0 1em;
}

/* Toggle */
.smbt-toggle{ display:inline-flex; align-items:center; gap:10px; user-select:none; }
.smbt-switch{ position:relative; width:44px; height:24px; display:inline-block; }
.smbt-switch input[type="checkbox"]{ opacity:0; width:0; height:0; }

.smbt-slider{
  position:absolute; inset:0;
  cursor:pointer;
  background:#c3c4c7;
  transition:.2s;
  border-radius:999px;
}
.smbt-slider:before{
  content:"";
  position:absolute;
  width:18px; height:18px;
  left:3px; top:3px;
  background:#fff;
  transition:.2s;
  border-radius:50%;
  box-shadow:0 2px 6px rgba(0,0,0,.18);
}
.smbt-switch input[type="checkbox"]:checked + .smbt-slider{ background:#46b450; }
.smbt-switch input[type="checkbox"]:checked + .smbt-slider:before{ transform:translateX(20px); }

.smbt-pill{
  padding:3px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid #dcdcde;
}
.smbt-pill-on{ background:#e7f7ed; color:#1e7b34; border-color:#bfe7cb; }
.smbt-pill-off{ background:#f6f7f7; color:#50575e; }

/* Dropdowns (Edición / Categoría) */
.smbt-insc-filters select{
  -webkit-appearance:none;
  appearance:none;
  padding:10px 40px 10px 12px;
  border-radius:10px;
  border:1px solid #dcdcde;
  background:#fff;
  font-size:13px;
  line-height:1.2;
  min-height:40px;
  box-shadow:0 1px 0 rgba(0,0,0,.04);
  transition:border-color .15s, box-shadow .15s, transform .05s;
}

/* Flecha “bonita” */
.smbt-insc-filters select{
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    100% 0;
  background-size:6px 6px, 6px 6px, 2.5em 2.5em;
  background-repeat:no-repeat;
}

.smbt-insc-filters select:hover{
  border-color:#bfc3c7;
}
.smbt-insc-filters select:focus{
  outline:none;
  border-color:#2271b1;
  box-shadow:0 0 0 3px rgba(34,113,177,.18);
}

/* Si el tema mete márgenes raros */
.smbt-insc-filters select,
.smbt-insc-filters label{
  margin:0;
}


/* ================================
   SMBT DataTables (Plantilla / tablas anchas)
   - Evita contenedores estrechos del tema
   - Hace que la tabla ocupe todo el ancho disponible
   - Deja scroll horizontal solo si es estrictamente necesario
   ================================ */

/* El wrapper que ya usas en plantilla.php: <div class="smbt-dt-wrap smbt-dt-modern"> */
.smbt-dt-wrap{
  width:100%;
  max-width:none;
  overflow-x:auto;
}

/* En algunos temas FSE el contenido va dentro de contenedores con max-width.
   Esto asegura que el wrapper no se quede “encajonado”. */
.wp-site-blocks .smbt-dt-wrap,
.wp-block-post-content .smbt-dt-wrap,
.entry-content .smbt-dt-wrap{
  max-width:none;
}

.smbt-dt-wrap .dataTables_wrapper{
  /*width:100%;*/
}

/* Fuerza a DataTables a recalcular al 100% del contenedor */
.smbt-dt-wrap table.dataTable{
  width:100% !important;
}

/* Si el tema o DataTables meten nowrap, con muchas columnas obliga a scroll.
   Permitimos partir texto en celdas (sin romper números/íconos). */
.smbt-dt-wrap table.dataTable th,
.smbt-dt-wrap table.dataTable td{
  white-space:normal;
  overflow-wrap:anywhere;
}

/* Asegura que el encabezado no se “coma” el ancho */
.smbt-dt-wrap table.dataTable thead th{
  vertical-align:bottom;
}

/* ================================
   SMBT Toolbar (reutilizable)
   ================================ */

.smbt-toolbar{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:flex-end;
  margin:12px 0 16px 0;
}

.smbt-toolbar .smbt-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:180px;
}

.smbt-toolbar .smbt-field label{
  font-weight:700;
  margin:0;
}

/* Controles (select / input date / input datetime-local, etc.) */
.smbt-toolbar .smbt-control{
  -webkit-appearance:none;
  appearance:none;

  width:100%;
  min-height:20px;

  padding:10px 12px;
  border-radius:10px;
  border:1px solid #dcdcde;

  background:#fff;
  font-size:13px;
  line-height:1.2;

  box-shadow:0 1px 0 rgba(0,0,0,.04);
  transition:border-color .15s, box-shadow .15s, transform .05s;
}

.smbt-toolbar .smbt-control:hover{
  border-color:#bfc3c7;
}

.smbt-toolbar .smbt-control:focus{
  outline:none;
  border-color:#2271b1;
  box-shadow:0 0 0 3px rgba(34,113,177,.18);
}

/* Select con flecha bonita (igual estilo que tus filtros) */
.smbt-toolbar .smbt-select{
  padding-right:40px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    100% 0;
  background-size:6px 6px, 6px 6px, 2.5em 2.5em;
  background-repeat:no-repeat;
}

/* Input date/datetime: mismo look, sin flecha */
.smbt-toolbar .smbt-input{
  background-image:none;
}

/* Grupo de botones (atrás / hoy / adelante / refrescar) */
.smbt-toolbar .smbt-btn-group{
  display:inline-flex;
  gap:8px;
  align-items:center;
  margin-left: auto;
}

.smbt-toolbar .smbt-btn{
  min-height:40px;
  border-radius:10px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.smbt-toolbar .smbt-btn-icon{
  width:40px;
  padding:0;
}

/* Opcional: que el date no quede enano */
.smbt-asist-toolbar .smbt-field:has(#smbt_day){
  min-width:190px;
}

/* Texto en Asistencias en 2 líneas */
/* Permite 2 líneas dentro de los bloques */
/* bloque con 2 líneas fijas */
.smbtTL_block.smbtTL_block--2l{
  white-space: normal;   /* el wrap lo controlan las líneas */
  padding-top: 6px;
  padding-bottom: 6px;
}

/* cada línea: NO wrap, ellipsis */
.smbtTL_blockLine{
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.smbtTL_blockLine--2{
  opacity: .85;
  font-size: 12px; /* opcional */
}

/* modal asistencias */
/* ===== Modal asistencia ===== */
#smbt_modal{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:99999; display:none; }
#smbt_modal .smbtM_dialog{
  background:#fff; max-width:640px; margin:7vh auto; border-radius:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
  overflow:hidden;
}
#smbt_modal .smbtM_head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; border-bottom:1px solid #e5e7eb; background:#fbfbfc;
}
#smbt_modal .smbtM_title{ margin:0; font-size:16px; font-weight:800; color:#111827; }
#smbt_modal .smbtM_close{
  border:1px solid #d1d5db; background:#fff; border-radius:10px;
  padding:6px 10px; cursor:pointer;
}
#smbt_modal .smbtM_body{ padding:16px; }

#smbt_modal .smbtF{ display:grid; gap:12px; grid-template-columns: 1fr 1fr; }
#smbt_modal .smbtF_full{ grid-column:1 / -1; }

#smbt_modal .smbtField label{
  display:block; font-weight:700; margin:0 0 6px 0; color:#111827;
}
#smbt_modal .smbtHelp{ margin-top:6px; font-size:12px; color:#6b7280; }

#smbt_modal .smbtCtrl{
  width:100%; box-sizing:border-box;
  border:1px solid #d1d5db; border-radius:10px;
  padding:10px 10px;
  background:#fff;
  outline:none;
}
#smbt_modal .smbtCtrl:focus{
  border-color:#2271b1;
  box-shadow:0 0 0 2px rgba(34,113,177,.18);
}

#smbt_modal .smbtM_foot{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 16px; border-top:1px solid #e5e7eb; background:#fbfbfc;
}
#smbt_modal .smbtM_actions{ display:flex; gap:10px; justify-content:flex-end; }
#smbt_modal .smbtBtn{
  border-radius:10px; padding:8px 12px; border:1px solid #d1d5db; background:#fff; cursor:pointer;
}
#smbt_modal .smbtBtnPrimary{ background:#2271b1; border-color:#1f5f93; color:#fff; font-weight:700; }
#smbt_modal .smbtBtnDanger{ background:#fff; border-color:#b32d2e; color:#b32d2e; font-weight:700; }
#smbt_modal .smbtBtn:active{ transform: translateY(1px); }

#smbt_modal_msg{
  display:none; margin:0; padding:10px 12px;
  border:1px solid #fca5a5; background:#fff1f2; color:#b32d2e;
  border-radius:10px; font-weight:700;
}

@media (max-width: 680px){
  #smbt_modal .smbtM_dialog{ margin:10vh 12px; }
  #smbt_modal .smbtF{ grid-template-columns: 1fr; }
  #smbt_modal .smbtM_foot{ flex-direction:column; align-items:stretch; }
  #smbt_modal .smbtM_actions{ justify-content:stretch; }
  #smbt_modal .smbtM_actions .smbtBtn{ width:100%; }
}
