/* ── FaceDetect Eventos — Estilos ─────────────────────────────────────────────── */

/* Archive */
.facedetect-archive-header { margin-bottom: 32px; }
.facedetect-archive-title  { font-size: 2rem; margin-bottom: 8px; }
.facedetect-archive-subtitle { color: #666; font-size: 1.1rem; }

.facedetect-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.facedetect-event-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
}
.facedetect-event-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }

.facedetect-event-card__thumb { display: block; aspect-ratio: 16/9; overflow: hidden; }
.facedetect-event-card__img   { width: 100%; height: 100%; object-fit: cover; }
.facedetect-event-card__no-thumb { width: 100%; height: 100%; background: #e5e7eb; }

.facedetect-event-card__body  { padding: 16px; }
.facedetect-event-card__title { font-size: 1.35rem; margin: 0 0 8px; line-height: 1.3; }
.facedetect-event-card__title a { text-decoration: none; color: inherit; }
.facedetect-event-card__title a:hover { color: #006400; }
.facedetect-event-card__meta  { font-size: 1rem; color: #888; margin: 0 0 8px; }
.facedetect-event-card__count { font-size: 1rem; color: #555; margin: 0 0 12px; }

/* Botões */
.facedetect-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background .15s, color .15s;
  line-height: 1.4;
}
.facedetect-btn--primary  { background: #1a6b1a; color: #fff; }
.facedetect-btn--primary:hover { background: #145214; color: #fff; }
.facedetect-btn--secondary { background: #fff; color: #1a6b1a; border-color: #1a6b1a; }
.facedetect-btn--secondary:hover { background: #f0faf0; }
.facedetect-btn--outline  { background: #fff; color: #444; border-color: #ccc; }
.facedetect-btn--outline:hover { background: #f5f5f5; }
.facedetect-btn--ghost    { background: transparent; color: #666; border-color: transparent; }
.facedetect-btn--ghost:hover { color: #333; }
.facedetect-btn:disabled, .facedetect-btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Pagination */
.facedetect-pagination { margin: 24px 0; text-align: center; }
.facedetect-pagination .page-numbers { display: inline-block; padding: 6px 12px; margin: 0 2px; border-radius: 4px; border: 1px solid #ddd; text-decoration: none; color: #333; }
.facedetect-pagination .page-numbers.current { background: #1a6b1a; color: #fff; border-color: #1a6b1a; }

/* Single evento header */
.facedetect-event-single__header { margin-bottom: 20px; }
.facedetect-event-single__title  { font-size: 2rem; margin-bottom: 8px; }
.facedetect-event-single__meta   { font-size: .9rem; color: #666; }
.facedetect-event-single__cover  { margin-bottom: 24px; }
.facedetect-event-single__cover-img { width: 100%; border-radius: 8px; }
.facedetect-event-single__description { margin-bottom: 32px; }

/* Selfie search widget */
.facedetect-selfie-search {
  background: #f8fdf8;
  border: 2px solid #c8e6c9;
  border-radius: 12px;
  padding: 28px;
  margin: 32px 0;
}
.facedetect-selfie-search__title    { font-size: 1.5rem; margin: 0 0 6px; color: #1a6b1a; }
.facedetect-selfie-search__subtitle { color: #555; margin: 0 0 20px; }

.facedetect-consent-box   { margin-bottom: 20px; }
.facedetect-consent-label { display: flex; gap: 10px; cursor: pointer; font-size: .9rem; align-items: flex-start; }
.facedetect-consent-check { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; accent-color: #1a6b1a; }

.facedetect-capture-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.facedetect-selfie-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.facedetect-selfie-preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; border: 3px solid #1a6b1a; }
.facedetect-btn-icon {
  background: none; border: none; font-size: 1.4rem; cursor: pointer;
  color: #999; line-height: 1; padding: 0;
}
.facedetect-btn-icon:hover { color: #c00; }

.facedetect-camera-area { margin-bottom: 16px; }
.facedetect-camera-area video { width: 100%; max-width: 480px; border-radius: 8px; background: #000; }
.facedetect-camera-controls { display: flex; gap: 10px; margin-top: 10px; }

.facedetect-btn--search { margin-top: 12px; }

/* Loading */
.facedetect-searching {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  color: #555;
}
.facedetect-spinner {
  width: 28px; height: 28px;
  border: 3px solid #c8e6c9;
  border-top-color: #1a6b1a;
  border-radius: 50%;
  animation: facedetect-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes facedetect-spin { to { transform: rotate(360deg); } }

/* Resultados */
.facedetect-results { margin-top: 20px; }
.facedetect-results-title { font-size: 1.15rem; margin-bottom: 14px; color: #1a6b1a; }

.facedetect-results-grid, .facedetect-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.facedetect-result-item, .facedetect-gallery-item {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 6px;
  position: relative;
}
.facedetect-result-item img, .facedetect-gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .2s;
}
.facedetect-result-item:hover img, .facedetect-gallery-item:hover img { transform: scale(1.04); }

.facedetect-result-score {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(26,107,26,.8);
  color: #fff;
  font-size: .75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Galeria completa */
.facedetect-full-gallery { margin-top: 40px; }
.facedetect-full-gallery__title { font-size: 1.4rem; margin-bottom: 6px; }
.facedetect-full-gallery__count { font-size: .85rem; color: #888; margin-bottom: 16px; }

/* Responsivo */
@media (max-width: 640px) {
  .facedetect-events-grid { grid-template-columns: 1fr; }
  .facedetect-results-grid, .facedetect-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .facedetect-selfie-search { padding: 18px; }
}
