/**
 * styles/feedometer-db-modal.css
 * FeedOmeter 2.1 — Modern Dual-Target Database Selector & Header Badge
 */

/* ── Top Bar Database Switcher Badge ── */
.db-target-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-color, #e0e0e0);
  background: var(--bg-card, rgba(255, 255, 255, 0.07));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.db-target-badge-btn:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.12));
  border-color: var(--accent-color, #3b82f6);
  transform: translateY(-1px);
}

.db-target-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  display: inline-block;
}

.db-target-dot.neon {
  background: #06b6d4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.db-target-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* ── Database Picker Modal Overlay ── */
.db-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.db-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.db-modal-card {
  background: #18191f;
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.db-modal-overlay.open .db-modal-card {
  transform: translateY(0) scale(1);
}

.db-modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.db-modal-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.db-modal-header p {
  font-size: 13.5px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.45;
}

/* ── Option Cards ── */
.db-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

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

.db-option-card {
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.db-option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.db-option-card.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 1px #3b82f6, 0 8px 20px rgba(59, 130, 246, 0.2);
}

.db-option-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.db-option-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.db-option-desc {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
  margin-bottom: 12px;
  flex-grow: 1;
}

.db-option-meta {
  font-size: 11px;
  font-family: monospace;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  color: #a78bfa;
  margin-bottom: 8px;
  word-break: break-all;
}

.db-option-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #10b981;
}

.db-option-status.unreachable {
  color: #ef4444;
}

.db-option-status.checking {
  color: #f59e0b;
}

/* ── Modal Footer ── */
.db-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.db-connect-btn {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.db-connect-btn:hover {
  background: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}
