.selection-info{
  margin:0 20px 10px;
  padding:12px 14px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fafafa;
}

.selection-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}

.selection-head strong{
  font-size:15px;
}

.selection-head button{
  margin-left:auto;
  border:1px solid #d1d5db;
  border-radius:6px;
  background:#fff;
  padding:6px 9px;
  cursor:pointer;
}

.selection-details{
  display:grid;
  gap:8px;
  font-size:13px;
}

.selection-block{
  display:grid;
  gap:2px;
}

.selection-block span,
.selection-persons span,
.selection-places span{
  color:#374151;
}

.selection-block small{
  color:#6b7280;
}

.selection-persons,
.selection-places{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding-top:6px;
  border-top:1px solid #e5e7eb;
}

.search-form{
  display:flex;
  gap:8px;
  padding:10px 20px 0;
}

.search-form input{
  flex:1;
  min-width:0;
  padding:8px 10px;
  border:1px solid #d1d5db;
  border-radius:6px;
}

.search-form button{
  border:1px solid #d1d5db;
  border-radius:6px;
  background:#fff;
  padding:8px 12px;
  cursor:pointer;
}

.search-results{
  margin:8px 20px 0;
  max-height:220px;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}

.search-result{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:6px 10px;
  padding:9px 11px;
  border:0;
  border-bottom:1px solid #f0f1f3;
  background:#fff;
  text-align:left;
  cursor:pointer;
}

.search-result:last-child{
  border-bottom:0;
}

.search-result:hover{
  background:#f8fafc;
}

.search-result-type{
  grid-row:1 / span 2;
  align-self:start;
  padding:2px 6px;
  border-radius:999px;
  background:#f3f4f6;
  font-size:11px;
  font-weight:700;
}

.search-result strong{
  font-size:13px;
}

.search-result span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#6b7280;
  font-size:12px;
}

.search-empty{
  padding:12px;
  color:#6b7280;
  font-size:13px;
}

.event-select{
  width:100%;
  border:1px solid #e5e7eb;
  border-radius:7px;
  background:#fff;
  padding:9px 10px;
  text-align:left;
  cursor:pointer;
  font:inherit;
}

.event-select:hover{
  border-color:#9ca3af;
  background:#f8fafc;
}

.event-select.is-active{
  border-color:#6b7280;
  background:#eef2f6;
  box-shadow:inset 3px 0 0 #4b5563;
}

.bible-place-label{
  border:0;
  border-radius:4px;
  background:rgba(255,255,255,.92);
  box-shadow:0 1px 4px rgba(0,0,0,.18);
  padding:2px 5px;
  color:#111827;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  pointer-events:none;
}

.bible-place-label::before{
  display:none;
}

.map-active-event{
  font-weight:700;
  color:#344054 !important;
}

.entity-detail{
  position:absolute;
  z-index:650;
  top:14px;
  right:14px;
  width:min(360px,calc(100% - 28px));
  max-height:calc(100% - 28px);
  overflow:auto;
  padding:16px 16px 14px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:rgba(255,255,255,.97);
  box-shadow:0 8px 28px rgba(0,0,0,.18);
}

.entity-detail-close{
  position:absolute;
  top:8px;
  right:10px;
  width:30px;
  height:30px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#4b5563;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

.entity-detail-close:hover{
  background:#f3f4f6;
}

.entity-detail h2{
  margin:0 34px 2px 0;
  font-size:20px;
}

.entity-detail-subtitle{
  margin-bottom:12px;
  color:#6b7280;
  font-size:13px;
}

.entity-detail-grid{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:7px 10px;
  margin:10px 0 12px;
  font-size:13px;
}

.entity-detail-grid dt{
  font-weight:700;
  color:#4b5563;
}

.entity-detail-grid dd{
  margin:0;
}

.entity-detail-description,
.entity-detail-evidence{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid #e5e7eb;
  font-size:13px;
  line-height:1.6;
}

.entity-detail-source{
  margin-top:12px;
  font-size:13px;
}

.entity-detail-source a{
  font-weight:700;
}

.entity-link{
  border:0;
  border-radius:4px;
  background:transparent;
  padding:1px 3px;
  color:#1d4ed8;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.entity-link:hover,
.entity-link:focus{
  background:#eff6ff;
  outline:none;
  text-decoration:underline;
}
