/* --------------------------------------------------------------------------
   CountryCodes Theme CSS
   Basic layout, typography, and responsive design
-------------------------------------------------------------------------- */

:root {
  --max-width: 1200px;
  --accent: #0b66c3;
  --bg-color: #fafafa;
  --text-color: #222;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 0.75rem 0;
}

.branding {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--accent);
}

.site-description {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

.primary-nav a {
  color: #333;
  text-decoration: none;
}

.content-area {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
}

.main-column {
  flex: 1;
}

.sidebar {
  width: 300px;
}

.country-card {
  border: 1px solid #eee;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: #fff;
}

.country-header .country-title {
  margin: 0;
  font-size: 1.2rem;
}

.country-meta {
  font-size: 0.95rem;
  color: #555;
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.entry-title {
  font-size: 1.5rem;
}

.site-footer {
  border-top: 1px solid #eee;
  padding: 1rem 0;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #555;
}

.archive-header, .search-header, .error-404 {
  margin-bottom: 1rem;
}

.pagination {
  margin-top: 1rem;
}

/* Data Explorer styles */
#cc-country-select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

#cc-reset {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#cc-reset:hover {
  background: darken(var(--accent), 10%);
}

/* Responsive layout */
@media (max-width: 800px) {
  .content-area {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}
