/* governance.css — ICS Governance App */

:root {
  --gov-accent:     var(--primary);
  --gov-light:      var(--primary-light);
  --gov-border:     var(--primary-alpha);
}

.gov-shell {
  min-height: calc(100vh - 56px);
  background: var(--bg);
}

/* ── Content area ───────────────────────────────────────────── */
.gov-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-s) var(--space-s) var(--space-2xl);
}

.gov-section-heading {
  margin-bottom: var(--space-xs);
}

.gov-branch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-s);
}
@media (min-width: 600px) {
  .gov-branch-grid { grid-template-columns: 1fr 1fr; }
}

.gov-branch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-s);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gov-branch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.gov-branch-label {
  margin-bottom: var(--space-3xs);
}

.gov-branch-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--space-s);
  line-height: 1.5;
}

/* ── Type navigation (Grid Filter) ─────────────────────────── */
.gov-type-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3xs);
  margin-bottom: var(--space-s);
}

.gov-type-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
  text-align: center;
  color: var(--muted);
}
.gov-type-pill:hover { 
    border-color: var(--gov-accent); 
    color: var(--text);
}
.gov-type-pill--active {
  background: var(--gov-accent);
  color: var(--button-text);
  border-color: var(--gov-accent);
}

/* ── List header ────────────────────────────────────────────── */
.gov-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-s);
  gap: var(--space-s);
}
.gov-list-title {
  font-size: var(--fz-3);
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 0;
}

/* ── Detail view ────────────────────────────────────────────── */
.gov-detail-header {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-m);
}
.gov-detail-title {
  font-size: var(--fz-4);
  font-weight: 700;
  color: var(--text);
  margin: var(--space-3xs) 0 var(--space-xs);
  line-height: 1.2;
}
.gov-detail-summary {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: var(--space-s);
  line-height: 1.6;
}
.gov-content-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: var(--space-l);
  white-space: pre-wrap;
}

/* ── Panel ──────────────────────────────────────────────────── */
.gov-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-s);
  margin: var(--space-s) 0;
}

.gov-attrs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  font-size: 13px;
}
.gov-attrs dt {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  padding-top: 2px;
}
.gov-attrs dd { color: var(--text); margin: 0; font-weight: 500; }

/* ── Linked records panel ───────────────────────────────────── */
.gov-link-group { margin-bottom: var(--space-s); }

.gov-link-item {
  transition: background 0.1s;
}

.gov-scripture-link { 
    background: var(--gov-light); 
    border-left: 4px solid var(--gov-accent);
}

.gov-verse-text { 
    font-size: 13px; 
    color: var(--text); 
    margin-top: 4px; 
    line-height: 1.5;
    font-style: italic;
    opacity: 0.9;
}

/* ── Version chain ──────────────────────────────────────────── */
.gov-version-chain {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gov-version-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.gov-version-item--current { 
    background: var(--card); 
    border-color: var(--gov-accent); 
    box-shadow: 0 2px 8px var(--shadow);
}
.gov-version-num {
  font-weight: var(--font-weight-black);
  color: var(--gov-accent);
  font-size: 14px;
}

/* ── Form structure ─────────────────────────────────────────── */
.gov-form-group {
  margin-bottom: var(--space-s);
}

/* ── Loading / empty ────────────────────────────────────────── */
.gov-empty { 
    text-align: center; 
    padding: 4rem 1rem; 
    color: var(--muted); 
}
.gov-empty i {
    font-size: 48px;
    opacity: 0.2;
    margin-bottom: 1rem;
    display: block;
}
