/**
 * Geographic Impact Map Styles
 */

.geographic-impact-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.geographic-header {
  text-align: center;
  margin-bottom: 2rem;
}

.geographic-header h2 {
  font-size: 2rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.geographic-header .lead {
  color: #64748b;
  font-size: 1.1rem;
}

/* National Summary */
.national-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.summary-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.summary-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Canada Map Container */
.canada-map-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-bottom: 3rem;
  background: #f8fafc;
  border-radius: 16px;
  padding: 2rem;
}

@media (max-width: 900px) {
  .canada-map-container {
    grid-template-columns: 1fr;
  }
}

/* SVG Map Styles */
.canada-map {
  width: 100%;
  height: auto;
  max-height: 500px;
}

.canada-map .region path {
  fill: #cbd5e1;
  stroke: #94a3b8;
  stroke-width: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.canada-map .region:hover path {
  fill: #94a3b8;
  stroke: #64748b;
}

.canada-map .region.has-proposals path {
  fill: #10b981;
}

.canada-map .region.has-proposals:hover path {
  fill: #059669;
}

.canada-map .region.has-coalitions path {
  fill: #3b82f6;
}

.canada-map .region.has-coalitions:hover path {
  fill: #2563eb;
}

.canada-map .region.active path {
  fill: #f59e0b;
  stroke: #d97706;
  stroke-width: 2;
}

.canada-map .region text {
  font-size: 14px;
  font-weight: 600;
  fill: #1e293b;
  pointer-events: none;
  text-anchor: middle;
}

/* Region Info Panel */
.region-info-panel {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.region-info-panel h3 {
  margin: 0 0 1rem 0;
  color: #1e293b;
  font-size: 1.25rem;
}

#region-stats {
  color: #64748b;
}

#region-stats .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

#region-stats .stat-row:last-child {
  border-bottom: none;
}

#region-stats .stat-label {
  color: #64748b;
}

#region-stats .stat-value {
  font-weight: 600;
  color: #1e293b;
}

/* Region Cards Grid */
.regions-grid {
  margin-bottom: 2rem;
}

.regions-grid h3 {
  margin-bottom: 1rem;
  color: #1e293b;
}

.region-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.region-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.region-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.region-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.region-code {
  background: #3b82f6;
  color: white;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.region-name {
  font-weight: 600;
  color: #1e293b;
}

.region-card-stats {
  display: flex;
  gap: 1rem;
}

.region-card-stats .stat {
  flex: 1;
  text-align: center;
}

.region-card-stats .stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #3b82f6;
}

.region-card-stats .stat-label {
  font-size: 0.75rem;
  color: #64748b;
}

.region-card .budget-impact {
  margin-top: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.budget-impact.positive {
  background: #dcfce7;
  color: #166534;
}

.budget-impact.negative {
  background: #fee2e2;
  color: #991b1b;
}

/* Map Legend */
.map-legend {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.map-legend h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: #64748b;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Region Detail Page */
.geographic-region-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.region-header {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-block;
  color: #3b82f6;
  text-decoration: none;
  margin-bottom: 1rem;
}

.back-link:hover {
  text-decoration: underline;
}

.region-header h2 {
  font-size: 2rem;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.region-meta {
  color: #64748b;
}

.region-meta span {
  margin-right: 1.5rem;
}

.region-statistics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #3b82f6;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card.budget {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
}

.stat-card.budget .stat-value,
.stat-card.budget .stat-label {
  color: white;
}

/* Proposals Section */
.proposals-section,
.federal-section,
.schools-section {
  margin-bottom: 2rem;
}

.proposals-section h3,
.federal-section h3,
.schools-section h3 {
  color: #1e293b;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.proposal-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.proposal-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.proposal-item.compact {
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.proposal-title {
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.proposal-title:hover {
  color: #3b82f6;
}

.proposal-item.compact .proposal-title {
  margin-bottom: 0;
}

.proposal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.proposal-meta .status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.proposal-meta .status--passed {
  background: #dcfce7;
  color: #166534;
}

.proposal-meta .status--coalition_building {
  background: #dbeafe;
  color: #1e40af;
}

.proposal-meta .status--floor_vote {
  background: #fef3c7;
  color: #92400e;
}

.proposal-meta .budget {
  font-size: 0.75rem;
  font-weight: 600;
}

.proposal-meta .budget.positive {
  color: #166534;
}

.proposal-meta .budget.negative {
  color: #991b1b;
}

.proposal-meta .category {
  font-size: 0.75rem;
  color: #64748b;
}

.proposal-summary {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.empty-message {
  color: #94a3b8;
  font-style: italic;
  padding: 1rem;
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
}

/* Schools Grid */
.schools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.school-card {
  background: #f8fafc;
  border-radius: 6px;
  padding: 0.75rem;
}

.school-name {
  display: block;
  font-weight: 500;
  color: #1e293b;
  font-size: 0.875rem;
}

.school-city {
  font-size: 0.75rem;
  color: #64748b;
}

.more-indicator {
  text-align: center;
  color: #64748b;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Region Actions */
.region-actions {
  display: flex;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.region-actions .button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.region-actions .button--primary {
  background: #3b82f6;
  color: white;
}

.region-actions .button--primary:hover {
  background: #2563eb;
}

.region-actions .button--secondary {
  background: #f1f5f9;
  color: #475569;
}

.region-actions .button--secondary:hover {
  background: #e2e8f0;
}
