/* Absolutely Norway's /entities page */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.page-header {
  margin-bottom: 20px;
}

.page-header p {
  color: var(--muted);
  margin-top: 4px;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-wrap .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  z-index: 1;
}

#entity-search {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  color: var(--ink);
  font-size: 1rem;
}

#entity-search::placeholder {
  color: var(--muted);
}

.search-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.entity-row {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  border: none;
  width: 100%;
}

.entity-row:hover {
  box-shadow: var(--shadow);
}

.entity-row-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-strong);
  flex-shrink: 0;
}

.entity-row-icon .icon {
  width: 20px;
  height: 20px;
}

.entity-row-main {
  flex: 1;
  min-width: 0;
}

.entity-row-name {
  font-size: 1rem;
}

.entity-row-meta {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-card {
  padding: 24px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-title h2 {
  font-size: 1.3rem;
}

.detail-title .org-number {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.badge-ok {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
}

.badge-warn {
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
}

.badge-danger {
  background: color-mix(in srgb, var(--error) 14%, transparent);
  color: var(--error);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.detail-field .field-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.detail-field .field-value {
  font-size: 0.95rem;
}

/* -- States ------------------------------------------------------------- */

.state-panel {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.state-panel[hidden] {
  display: none;
}

.state-panel .icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  color: var(--muted);
}

.state-panel.is-error .icon {
  color: var(--error);
}

