.gcb-widget { width: 100%; font-family: inherit; }

.gcb-form { display: flex; flex-direction: column; gap: 10px; }

.gcb-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.gcb-icon-search { font-size: 16px; opacity: .6; }

.gcb-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  padding: 10px 4px;
  min-width: 0;
}

.gcb-mic {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #64748b;
  padding: 8px;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.gcb-mic:hover { background: rgba(0,0,0,.05); color: #334155; }
.gcb-mic-icon { display: block; }
.gcb-mic.is-listening {
  color: #ef4444;
  background: rgba(239, 68, 68, .1);
  animation: gcb-pulse 1.1s infinite;
}

@keyframes gcb-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .35); }
  70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.gcb-submit {
  border: none;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.gcb-submit:hover { filter: brightness(0.95); }

.gcb-mode-minimal .gcb-filters,
.gcb-mode-minimal .gcb-status,
.gcb-mode-minimal .gcb-results,
.gcb-mode-minimal .gcb-pagination { display: none; }

.gcb-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-left: 6px;
}

.gcb-category {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.gcb-near-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.gcb-status {
  font-size: 13px;
  color: #64748b;
  margin: 10px 2px 0;
  min-height: 16px;
}
.gcb-status.is-error { color: #dc2626; }

.gcb-results {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gcb-results.gcb-layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gcb-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}
.gcb-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }

.gcb-layout-grid .gcb-card { flex-direction: column; }

.gcb-card-img {
  width: 84px; height: 84px; flex-shrink: 0;
  border-radius: 10px;
  background-size: cover; background-position: center;
  background-color: #f1f5f9;
}
.gcb-layout-grid .gcb-card-img { width: 100%; height: 140px; }
.gcb-card-img-empty { display: flex; }

.gcb-card-body { min-width: 0; flex: 1; }

.gcb-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }

.gcb-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.gcb-badge-featured { background: #f59e0b; color: #fff; }
.gcb-badge-distance { background: #2563eb; color: #fff; }
.gcb-badge-type { background: #e2e8f0; }

.gcb-card-title { margin: 2px 0 4px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.gcb-card-city { font-size: 12.5px; color: #64748b; margin-bottom: 2px; }
.gcb-card-cats { font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.gcb-card-excerpt { font-size: 13px; color: #64748b; margin: 0; line-height: 1.4; }

.gcb-speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 12px;
  grid-column: 1 / -1; /* ocupa todo el ancho en layout grid */
}
.gcb-speak-btn:hover { background: #f1f5f9; }
.gcb-speak-btn svg { flex-shrink: 0; }

.gcb-pagination { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.gcb-page-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.gcb-page-btn.is-active { background: #2563eb; color: #fff; border-color: #2563eb; }

@media (max-width: 640px) {
  .gcb-input-wrap { padding-left: 12px; }
  .gcb-submit { padding: 10px 14px; }
}

/* ── Modal de resultados ──────────────────────────────────────────────── */
body.gcb-modal-open { overflow: hidden; }

.gcb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease;
}
.gcb-modal-overlay.is-open { opacity: 1; visibility: visible; }

.gcb-modal-panel {
  background: #f8fafc;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  transform: translateY(-12px);
  transition: transform .18s ease;
}
.gcb-modal-overlay.is-open .gcb-modal-panel { transform: translateY(0); }

.gcb-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border: none;
  background: #fff;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.gcb-modal-close:hover { background: #f1f5f9; }

.gcb-modal-status { margin-top: 4px; margin-bottom: 4px; padding-right: 40px; }
.gcb-modal-results { margin-top: 12px; }
.gcb-modal-results.gcb-layout-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 640px) {
  .gcb-modal-overlay { padding: 0; align-items: stretch; }
  .gcb-modal-panel { max-width: none; max-height: none; height: 100%; border-radius: 0; }
}

/* ── Botón flotante de búsqueda por voz ───────────────────────────────── */
.gcb-fab {
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  z-index: 99000;
  transition: transform .15s ease, box-shadow .15s ease;
}
.gcb-fab:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.gcb-fab:active { transform: scale(0.96); }
.gcb-fab svg { width: 46%; height: 46%; }
.gcb-fab.is-listening {
  background-color: var(--gcb-fab-listening, #ef4444) !important;
  animation: gcb-fab-pulse 1.2s infinite;
}

@keyframes gcb-fab-pulse {
  0%   { box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 0 rgba(239, 68, 68, .45); }
  70%  { box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 0 rgba(239, 68, 68, 0); }
}
