/* ══════════════════════════════════════════
   Estudos Bíblicos — CSS
══════════════════════════════════════════ */

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn-back {
  background: none;
  border: none;
  color: #2D7A3A;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 6px;
  display: block;
}
.btn-back:hover { text-decoration: underline; }

.detalhe-actions { display: flex; gap: 8px; align-items: center; }

.btn-edit {
  background: #fff;
  border: 1.5px solid #2D7A3A;
  color: #2D7A3A;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
}
.btn-edit:hover { background: #2D7A3A; color: #fff; }

.btn-portal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a3320;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.btn-portal:hover { background: #2D7A3A; }

/* ── Estudos Grid ── */
.estudos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.estudo-card {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #E8F5E9;
  padding: 18px;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.estudo-card:hover { box-shadow: 0 4px 18px rgba(45,122,58,.12); transform: translateY(-2px); }

.estudo-card-header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.estudo-icon { font-size: 28px; }
.estudo-local { font-size: 15px; font-weight: 600; color: #1a3320; line-height: 1.4; }
.estudo-mins { font-size: 13px; color: #5a7a62; margin-top: 2px; }
.estudo-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.stat-pill { background: #E8F5E9; color: #2D7A3A; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.estudo-obs { font-size: 12px; color: #888; font-style: italic; border-top: 1px solid #f0f0f0; padding-top: 8px; margin-top: 4px; }

/* ── Tabs ── */
.tabs-bar { display: flex; gap: 4px; border-bottom: 2px solid #e8f5e9; margin-bottom: 20px; }

.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: #2D7A3A; }
.tab-btn.active { color: #2D7A3A; border-bottom-color: #2D7A3A; }

.tab-count {
  background: #2D7A3A;
  color: #fff;
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 11px;
}

.tab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ── Participantes List ── */
.participantes-list { display: flex; flex-direction: column; gap: 8px; }

.participante-row {
  background: #fff;
  border: 1.5px solid #E8F5E9;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.part-avatar {
  width: 38px; height: 38px;
  background: #2D7A3A;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  flex-shrink: 0;
}

.part-info { flex: 1; min-width: 0; }
.part-nome { font-size: 14px; font-weight: 600; color: #1a3320; }
.part-detalhes { font-size: 12px; color: #777; margin-top: 2px; }

.btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; }

/* ── Encontros List ── */
.encontros-list { display: flex; flex-direction: column; gap: 16px; }

.encontro-card {
  background: #fff;
  border: 1.5px solid #E8F5E9;
  border-radius: 12px;
  padding: 18px;
}
.encontro-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.encontro-data { font-size: 15px; font-weight: 600; color: #1a3320; }
.encontro-tema { font-size: 13px; color: #2D7A3A; margin-top: 3px; }
.encontro-meta { display: flex; gap: 14px; font-size: 13px; color: #666; margin-bottom: 10px; flex-wrap: wrap; }
.encontro-presentes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pres-badge { background: #E8F5E9; color: #2D7A3A; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.encontro-obs { font-size: 12px; color: #888; font-style: italic; border-top: 1px solid #f0f0f0; padding-top: 10px; margin-top: 6px; }

/* ── Fotos ── */
.fotos-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.foto-wrap { position: relative; }
.foto-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid #E8F5E9; transition: transform .15s; }
.foto-thumb:hover { transform: scale(1.05); }
.btn-del-foto {
  position: absolute; top: -6px; right: -6px;
  background: #e53935; color: #fff; border: none; border-radius: 50%;
  width: 20px; height: 20px; cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

.fotos-existentes-title { font-size: 12px; color: #999; margin-bottom: 6px; }

/* ── Upload Fotos ── */
.fotos-upload-area {
  border: 2px dashed #C8E6C9;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fafff9;
}
.fotos-upload-area:hover { border-color: #2D7A3A; background: #f0faf0; }
.fotos-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ── Modal: Ministradores ── */
.ministrador-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.ministrador-row { display: flex; gap: 8px; align-items: center; }
.ministrador-input { flex: 1; padding: 9px 12px; border: 1.5px solid #ddd; border-radius: 8px; font-size: 14px; }
.ministrador-input:focus { outline: none; border-color: #2D7A3A; }
.btn-remove-min { background: none; border: none; color: #e53935; cursor: pointer; font-size: 16px; padding: 4px 8px; }
.btn-add-text { background: none; border: none; color: #2D7A3A; cursor: pointer; font-size: 13px; font-weight: 500; padding: 0; text-decoration: underline; }

/* ── Participantes Checkbox ── */
.participantes-check {
  border: 1.5px solid #E8F5E9;
  border-radius: 10px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #333; }
.check-label input { accent-color: #2D7A3A; width: 16px; height: 16px; cursor: pointer; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px dashed #ddd;
}

/* ── Hint ── */
.hint { font-size: 13px; color: #aaa; font-style: italic; }

/* ── Toast (herda do acervo-louvores) ── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: #323232; color: #fff; padding: 12px 24px; border-radius: 24px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 9999; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #c62828; }
