/*
  Basic styling for the Antibiotics & Resistance app.
  The layout is responsive: on larger screens the interactive diagram
  sits alongside the descriptive panel; on smaller screens the
  diagram stacks above the text. Colours correspond to antibiotic
  classes and charts for consistency with the diagram.
*/

:root {
  --color-primary: #4285f4;
  --color-secondary: #34a853;
  --color-accent: #fbbc04;
  --color-warning: #f28b82;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: #fdfdfd;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

header h1 {
  margin-top: 0;
  color: var(--color-primary);
}

section {
  margin-top: 2rem;
}

h2 {
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

h3 {
  margin-top: 0;
  color: var(--color-primary);
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

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

li {
  margin-bottom: 0.5rem;
}

/* Diagram and class info layout */
.diagramWrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.diagram {
  flex: 1 1 300px;
  max-width: 400px;
}

.classInfo {
  flex: 1 1 250px;
  min-width: 250px;
  background-color: #f7f7f7;
  border: 1px solid #e0e0e0;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.classInfo ul {
  list-style-type: disc;
  padding-left: 20px;
}

.classInfo .placeholder {
  font-style: italic;
  color: #666;
}

/* Details (accordion) styling for ESBL genes */
details {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 10px;
}

details summary {
  cursor: pointer;
  font-weight: bold;
  color: var(--color-accent);
  list-style: none;
}

details[open] summary {
  color: var(--color-primary);
}

canvas {
  max-width: 100%;
  margin-top: 1rem;
}

.chartNote {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.5rem;
}

/* Prevention list */
.prevent {
  list-style-type: none;
  padding-left: 0;
}

.prevent li::before {
  content: '\2022'; /* bullet */
  color: var(--color-secondary);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

footer {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  padding-top: 1rem;
}

/* Accordion styling for beta‑lactam classes and resistance mechanisms */
.classDetail,
.drugDetail {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.classDetail summary,
.drugDetail summary {
  cursor: pointer;
  font-weight: bold;
  color: var(--color-accent);
  list-style: none;
}

.classDetail[open] summary,
.drugDetail[open] summary {
  color: var(--color-primary);
}

/* Table styling for intrinsic resistance patterns */
.tableWrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th,
td {
  border: 1px solid #e0e0e0;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f7f7f7;
}

/* Search input styling */
.searchInput {
  width: 100%;
  padding: 8px;
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
}