/* ══════════════════════════════════════════
   Acervo de Louvores — CSS
   Complementa admin-painel.css
══════════════════════════════════════════ */

/* ── Barra de busca ── */
.search-bar-wrap {
  margin-bottom: 12px;
}

.search-input-wrap {
  position: relative;
  max-width: 560px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  border: 1.5px solid #e0e0e2;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text-dark, #1d1d1f);
  transition: border-color .2s;
  outline: none;
}

.search-input:focus {
  border-color: #2D7A3A;
  box-shadow: 0 0 0 3px rgba(45,122,58,.1);
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 14px;
  color: #6e6e73;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  line-height: 1;
}

.search-clear:hover { background: #f0f0f0; }

/* ── Filtros ── */
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.filter-select {
  padding: 8px 12px;
  border: 1.5px solid #e0e0e2;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--text-dark, #1d1d1f);
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}

.filter-select:focus { border-color: #2D7A3A; }

.btn-filter-clear {
  padding: 8px 14px;
  background: none;
  border: 1.5px solid #e0e0e2;
  border-radius: 8px;
  font-size: 12px;
  color: #6e6e73;
  cursor: pointer;
  transition: all .2s;
}

.btn-filter-clear:hover { border-color: #c00; color: #c00; }

.btn-nova-musica {
  margin-left: auto;
}

/* ── Info de resultados ── */
.results-info {
  font-size: 13px;
  color: #6e6e73;
  margin-bottom: 16px;
}

/* ── Grid de músicas ── */
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.loading-spinner {
  grid-column: 1/-1;
  text-align: center;
  color: #6e6e73;
  padding: 48px;
  font-size: 14px;
}

/* ── Card de música ── */
.song-card {
  background: #fff;
  border: 1px solid #e8e8ea;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .2s, transform .15s;
  position: relative;
}

.song-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.btn-fav {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 6px;
  transition: transform .15s;
  flex-shrink: 0;
}

.btn-fav:hover { transform: scale(1.2); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1.3;
}

.card-artist {
  font-size: 13px;
  color: #6e6e73;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge-chip {
  padding: 2px 8px;
  background: #f0f6f1;
  color: #2D7A3A;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}

.badge-chip.keyword {
  background: #f5f5f7;
  color: #6e6e73;
}

.card-last-played {
  font-size: 11px;
  color: #C8952A;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-action {
  flex: 1;
  padding: 7px 4px;
  border: 1.5px solid #e0e0e2;
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #3d3d3f;
  transition: all .2s;
  font-weight: 500;
}

.btn-action:hover {
  border-color: #2D7A3A;
  color: #2D7A3A;
  background: #f0f6f1;
}

.btn-action.primary {
  background: linear-gradient(135deg, #1A5C2A, #2D7A3A);
  border-color: transparent;
  color: #fff;
}

.btn-action.primary:hover {
  opacity: .9;
  color: #fff;
  background: linear-gradient(135deg, #1A5C2A, #2D7A3A);
}

.btn-action.icon-only { flex: none; width: 36px; padding: 7px; }

/* ── Modal: largura extra ── */
.modal-wide {
  max-width: 600px;
}

.modal-sub {
  font-size: 13px;
  color: #6e6e73;
  margin: -8px 0 12px;
}

/* ── Campos em linha ── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ── Combo com botão inline ── */
.combo-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}

.combo-wrap select { flex: 1; }

.btn-add-inline {
  width: 32px;
  height: 32px;
  padding: 0;
  background: linear-gradient(135deg, #1A5C2A, #2D7A3A);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .2s;
}

.btn-add-inline:hover { opacity: .85; }

/* ── Keywords ── */
.keywords-wrap { display: flex; flex-direction: column; gap: 8px; }

.keywords-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #f0f6f1;
  border: 1px solid #c8e2cc;
  border-radius: 100px;
  font-size: 12px;
  color: #1A5C2A;
}

.kw-tag button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #6e6e73;
  padding: 0;
  line-height: 1;
}

.kw-tag button:hover { color: #c00; }

/* ── Upload ── */
.upload-area {
  border: 2px dashed #c8e2cc;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #f9fdf9;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #2D7A3A;
  background: #f0f6f1;
}

.upload-area.has-file {
  border-color: #2D7A3A;
  background: #edf7ee;
}

.upload-icon { font-size: 28px; margin-bottom: 6px; }
.upload-text { font-size: 14px; font-weight: 600; color: #1A5C2A; }
.upload-hint { font-size: 11px; color: #6e6e73; margin-top: 4px; }

.upload-progress {
  height: 4px;
  background: #e0e0e2;
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #1A5C2A, #4A9A5A);
  border-radius: 100px;
  width: 0%;
  transition: width .3s;
}

/* ── Estado vazio ── */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 64px 24px;
  color: #6e6e73;
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .songs-grid { grid-template-columns: 1fr; }
  .btn-nova-musica { margin-left: 0; }
  .filters-row { flex-direction: column; align-items: stretch; }
  .filter-select { width: 100%; }
}
