/* Shared styles for Economic Simulator pages */

body {
  font-family: Arial, sans-serif;
  margin: 20px;
}

#container {
  max-width: 900px;
  margin: auto;
}

p {
  margin: 0px;
  margin-bottom: 10px;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chart-container {
  position: relative;
  height: 500px;
  width: 100%;
  margin-bottom: 20px;
}

canvas {
  display: block;
}

form {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.param-group {
  display: flex;
  flex-direction: column;
}

.param-group label {
  margin: 0 0 5px 0;
  font-size: 12px;
  font-weight: bold;
}

.param-group input {
  width: 100%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

label {
  display: block;
  margin: 10px 0 5px;
}

input {
  width: 100%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.results-display {
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

section {
  margin-bottom: 50px;
}

summary {
  font-weight: bold;
  cursor: pointer;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 10px;
}

details {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
}

details > div {
  max-height: none;
  overflow-y: visible;
}

/* Navigation styles */
.nav-breadcrumb {
  margin-bottom: 30px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.nav-breadcrumb a {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  color: #007bff;
  text-decoration: none;
  margin-right: 10px;
  padding: 12px 20px;
  display: inline-block;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-breadcrumb a:hover {
  box-shadow: 0 15px 50px 0 rgba(31, 38, 135, 0.5);
  background: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.nav-breadcrumb span {
  color: #6c757d;
  margin: 0 5px;
}

.page-navigation {
  margin: 40px 0;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.page-navigation h3 {
  margin-bottom: 20px;
  color: #333;
}

.nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 15px;
}

@media (min-width: 768px) {
  .nav-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.nav-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 15px;
  border-radius: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: all 0.3s ease;
}

.nav-card:hover {
  box-shadow: 0 15px 50px 0 rgba(31, 38, 135, 0.5);
}

.nav-card a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.nav-card a:hover {
  color: #007bff;
}

/* Natural Rights Section Styles */
.natural-rights-section {
  margin-top: 50px;
  padding: 30px 0;
  border-top: 2px solid #e9ecef;
}

.right-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 25px;
  border-radius: 1.75rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.right-card:hover {
  box-shadow: 0 15px 50px 0 rgba(31, 38, 135, 0.5);
}

.right-card h3 {
  margin-top: 0;
  font-size: 20px;
  margin-bottom: 15px;
}

.right-card p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.right-card .source {
  font-size: 0.9em;
  color: #666;
  margin-top: 15px;
  font-style: italic;
}

.right-principle {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.right-negative {
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #fff5f5, #ffeaea);
  border-radius: 4px;
}

.right-negative p {
  margin-bottom: 0;
  line-height: 1.6;
  font-weight: 500;
  color: #495057;
}

.right-positive {
  padding: 15px;
  background: linear-gradient(135deg, #f0f8f0, #e8f5e8);
  border-radius: 4px;
  margin-bottom: 15px;
}

.right-positive h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #495057;
  font-size: 16px;
}

.right-positive ul {
  margin: 0;
  padding-left: 20px;
}

.right-positive li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #495057;
}

.right-positive li:last-child {
  margin-bottom: 0;
}

.right-positive strong {
  color: #212529;
}

.right-enemies {
  padding: 15px;
  background: linear-gradient(135deg, #fff8f0, #ffedd5);
  border-radius: 4px;
  margin-bottom: 15px;
}

.right-enemies h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #495057;
  font-size: 16px;
}

.right-enemies ul {
  margin: 0;
  padding-left: 20px;
}

.right-enemies li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #495057;
}

.right-enemies li:last-child {
  margin-bottom: 0;
}

.right-enemies strong {
  color: #212529;
}

.right-solutions {
  padding: 15px;
  background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
  border-radius: 4px;
  margin-bottom: 15px;
}

.right-solutions h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #495057;
  font-size: 16px;
}

.right-solutions ul {
  margin: 0;
  padding-left: 20px;
}

.right-solutions li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #495057;
}

.right-solutions li:last-child {
  margin-bottom: 0;
}

.right-solutions strong {
  color: #212529;
}

/* Footer styling */
footer {
  margin-top: 60px;
  padding: 40px 20px 20px;
  border-top: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

footer nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

footer nav ul li a {
  color: #007bff;
  text-decoration: none;
}

footer nav ul li a:hover {
  text-decoration: underline;
}

footer h3 {
  margin-bottom: 15px;
  font-size: 16px;
}

@media (max-width: 768px) {
  footer nav ul {
    flex-direction: column;
    gap: 10px;
  }
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1e1e1e;
    color: #e0e0e0;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #ffffff;
  }

  details {
    border-color: #444;
    background-color: #2d2d2d;
  }

  summary {
    background-color: #2d2d2d;
  }

  input {
    background: rgba(45, 55, 72, 0.25) !important;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important;
  }

  .results-display {
    background: rgba(45, 55, 72, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .page-navigation {
    background-color: #2d2d2d;
  }

  .nav-card {
    background: rgba(45, 55, 72, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .nav-card a {
    color: #e0e0e0;
  }

  .nav-card a:hover {
    color: #6ea8fe;
  }

  .nav-card:hover {
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.5) !important;
  }

  footer {
    background-color: #2d2d2d;
    border-top-color: #444;
  }

  footer nav ul li a {
    color: #6ea8fe;
  }

  .right-card {
    background: rgba(45, 55, 72, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important;
  }

  .right-card:hover {
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.7) !important;
  }

  .right-card h3 {
    color: #ffffff;
  }

  .right-card p {
    color: #e0e0e0;
  }

  .right-card .source {
    color: #aaa;
  }

  .right-principle {
    border-bottom-color: #444;
  }

  .right-negative {
    background: linear-gradient(135deg, #2d1b1b, #3d2626) !important;
  }

  .right-positive {
    background: linear-gradient(135deg, #1b2d1b, #263d26) !important;
  }

  .right-negative p,
  .right-positive h4,
  .right-positive li {
    color: #e0e0e0;
  }

  .right-positive strong {
    color: #ffffff;
  }

  .right-enemies {
    background: linear-gradient(135deg, #2d241b, #3d3426) !important;
  }

  .right-enemies h4,
  .right-enemies li {
    color: #e0e0e0;
  }

  .right-enemies strong {
    color: #ffffff;
  }

  .right-solutions {
    background: linear-gradient(135deg, #1b2d3d, #264d66) !important;
  }

  .right-solutions h4,
  .right-solutions li {
    color: #e0e0e0;
  }

  .right-solutions strong {
    color: #ffffff;
  }

  /* Dark mode for main page navigation cards */
  section[style*="background: linear-gradient(135deg, #f8f9fa, #e9ecef)"] {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d) !important;
  }

  div[style*="background: white"] {
    background: #3d3d3d !important;
  }

  div[style*="background: white"] a {
    color: #e0e0e0 !important;
  }

  div[style*="background: white"] h3 {
    color: #6ea8fe !important;
  }

  div[style*="background: white"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
  }
}
