/* World Overview Panel - DM Tools world synopsis display */

.panel-world-overview {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel-bg, #1a1a2e);
  color: var(--text-primary, #e0e0e0);
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
}

/* Header */
.world-overview-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color, #333);
  background: var(--panel-header-bg, rgba(0, 0, 0, 0.2));
}

.world-overview-header .panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-gold, #ffd700);
}

.world-overview-header .panel-icon {
  font-size: 1.25rem;
}

.world-overview-header .world-tagline {
  margin: 0.25rem 0 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary, #888);
  font-style: italic;
}

/* Body */
.world-overview-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.world-overview-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary, #888);
}

/* Sections */
.world-section {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color, #333);
  border-radius: 4px;
  overflow: hidden;
}

.world-section:last-child {
  margin-bottom: 0;
}

.section-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan, #00d4ff);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Synopsis Section */
.world-synopsis .section-title {
  padding: 0.5rem 0.75rem;
  background: rgba(0, 212, 255, 0.1);
  border-bottom: 1px solid var(--border-color, #333);
}

.world-synopsis .section-content {
  padding: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.world-synopsis .section-content p {
  margin: 0 0 0.5rem 0;
}

.world-synopsis .section-content p:last-child {
  margin-bottom: 0;
}

/* Collapsible Sections */
.section-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: background 0.2s;
}

.section-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.section-toggle .toggle-icon {
  font-size: 0.7rem;
  transition: transform 0.2s;
  color: var(--text-secondary, #888);
}

.section-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(90deg);
}

.section-content.collapsed {
  display: none;
}

/* Entity Lists (Locations, Factions) */
.entity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
}

.entity-item:last-child {
  border-bottom: none;
}

.entity-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
}

.entity-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.entity-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
}

.entity-desc {
  font-size: 0.7rem;
  color: var(--text-secondary, #888);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* House Rules List */
.rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rule-item {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
}

.rule-item:last-child {
  border-bottom: none;
}

.rule-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-gold, #ffd700);
}

.rule-desc {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary, #888);
  margin-top: 0.125rem;
}

/* Campaign State */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.state-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.state-label {
  font-size: 0.65rem;
  color: var(--text-secondary, #888);
  text-transform: uppercase;
}

.state-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-cyan, #00d4ff);
}

/* Tension colors */
.tension-1, .tension-2 { color: #4ade80; }
.tension-3, .tension-4 { color: #fbbf24; }
.tension-5, .tension-6 { color: #f97316; }
.tension-7 { color: #ef4444; }

/* Empty states */
.empty-state {
  color: var(--text-secondary, #888);
  font-style: italic;
  font-size: 0.8rem;
}

/* Scrollbar */
.world-overview-body::-webkit-scrollbar {
  width: 6px;
}

.world-overview-body::-webkit-scrollbar-track {
  background: transparent;
}

.world-overview-body::-webkit-scrollbar-thumb {
  background: var(--border-color, #333);
  border-radius: 3px;
}

.world-overview-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary, #888);
}
