/* Contenedor principal del widget */
.ceca-fs {
  width: 100%;
  max-width: 1140px; /* tamaño objetivo típico de contenido */
  margin-left: auto; /* centra si sobra espacio */
  margin-right: auto;
  box-sizing: border-box; /* evita desbordes con padding/border */
}

/* Asegura box-sizing consistente dentro del widget */
.ceca-fs,
.ceca-fs * {
  box-sizing: border-box;
}

/* Filtros: 2 columnas */
.ceca-fs__filters {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: end;
}

/* En pantallas medianas: 1 columna */
@media (max-width: 768px) {
  .ceca-fs__filters {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Label */
.ceca-fs__label {
  margin: 0 0 8px 0;
  font: inherit;
  color: inherit;
  font-size: 0.9em;
  font-weight: 600;
}

/* Wrapper del select para flecha custom */
.ceca-fs__select-wrap {
  position: relative;
  width: 100%;
}

/* Select: rectangular, blanco, borde gris */
.ceca-fs__select {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 14px;

  font: inherit;
  color: inherit;
  line-height: 1.2;

  background: var(--ceca-white, #fff) !important;
  border: 1px solid var(--ceca-border-color, #d9d9d9) !important;
  border-radius: 0 !important;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* evita que el tema meta sombras raras */
  box-shadow: none !important;
}

/* Flecha tipo chevron */
.ceca-fs__chev {
  pointer-events: none;
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-55%) rotate(45deg);
  border-right: 2px solid #222;
  border-bottom: 2px solid #222;
  opacity: 0.8;
}

/* Divider */
.ceca-fs__divider {
  width: 100%;
  margin-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Results area */
.ceca-fs__results {
  width: 100%;
  padding: 44px 0;
  text-align: center;
}

/* Mostrar/ocultar empty state (lo controla JS con data-state) */
.ceca-fs__results[data-state="empty"] .ceca-fs__empty {
  display: inline-flex;
}
.ceca-fs__results[data-state="filled"] .ceca-fs__empty {
  display: none;
}
.ceca-fs__results[data-state="empty"] .ceca-fs__panel {
  display: none;
}
.ceca-fs__results[data-state="filled"] .ceca-fs__panel {
  display: block;
}

.ceca-fs__empty {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0.95;
}

/* Icono: responsive */
.ceca-fs__empty-ico {
  width: 160px;
  height: auto;
  max-width: 100%;
}

/* Texto vacío */
.ceca-fs__empty-text {
  font: inherit;
  color: inherit;
  opacity: 0.75;
  max-width: 420px;
}

.ceca-fs__panel {
  width: 100%;
  text-align: left;
}

/* ---- Tabla de resultados ---- */
.ceca-fs__table {
  width: 100%;
}

.ceca-fs__row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  margin-bottom: -1px; /* solapar bordes en filas consecutivas */
}

.ceca-fs__row-icon {
  flex-shrink: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ceca-primary, #002a4f);
  opacity: 0.8;
}

.ceca-fs__row-icon-svg {
  display: block;
}

.ceca-fs__row-info {
  flex: 1;
  min-width: 0;
}

.ceca-fs__row-date {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
}

.ceca-fs__row-title {
  font-size: 16px;
  line-height: 1.3;
  opacity: 0.75;
}

.ceca-fs__row-links {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.ceca-fs__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ceca-cyan, #00b5dd);
  text-decoration: underline;
  text-decoration-color: transparent;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    text-decoration-color 0.15s ease,
    opacity 0.15s ease;
  white-space: nowrap;
}

.ceca-fs__link-icon {
  flex-shrink: 0;
  display: block;
  opacity: 0.8;
}

.ceca-fs__link:hover {
  text-decoration-color: currentColor;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .ceca-fs__row {
    flex-wrap: wrap;
    gap: 14px;
  }

  .ceca-fs__row-links {
    width: 100%;
    padding-left: 64px; /* alinear con el texto */
  }
}

.ceca-fs__no-results {
  opacity: 0.75;
}

/* Hint */
.ceca-fs__hint {
  margin-top: 10px;
  font: inherit;
  color: inherit;
  opacity: 0.8;
}
