body {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
    Roboto, Ubuntu, sans-serif;
  padding: 0;
  margin: 0;
  line-height: 1.4;
}

.content {
  max-width: 600px;
  margin: 0 auto;
  padding: 12px;
}

h2 {
  margin-top: 2em;
}

h3 {
  margin-top: 1.5em;
}

a {
  color: #03a9f4;
}

.invisible {
  visibility: hidden;
}

.hidden {
  display: none;
}

esp-web-install-button[install-unsupported] {
  visibility: inherit;
}

.content pre {
  max-width: 100%;
  overflow-y: scroll;
}

.footer {
  margin-top: 24px;
  border-top: 1px solid #ccc;
  padding-top: 24px;
  text-align: center;
}

.footer .initiative {
  font-style: italic;
  margin-top: 16px;
}

table {
  border-spacing: 0;
}

td {
  padding: 8px;
  border-bottom: 1px solid #ccc;
}

.radios li {
  list-style: none;
  line-height: 2em;
}

.module-type {
  font-weight: bold;
  color: #03a9f4;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #333;
    color: #fff;
  }

  a {
    color: #58a6ff;
  }
}


/* Debug section styling */
.debug-section {
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.debug-section summary {
  padding: 10px;
  background-color: #f5f5f5;
  cursor: pointer;
  font-weight: 500;
}

.debug-section details[open] summary {
  border-bottom: 1px solid #ddd;
}

.debug-content {
  padding: 15px;
}

#refresh-debug {
  background-color: #00a0ab;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin: 10px 0;
}

#refresh-debug:hover {
  background-color: #018884;
}

.manifest-preview {
  background-color: #f8f8f8;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 10px;
  font-size: 12px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .debug-section {
    border-color: #444;
  }

  .debug-section summary {
    background-color: #333;
  }

  .debug-content {
    background-color: #222;
  }

  #refresh-debug {
    background-color: #00a0ab;
  }

  #refresh-debug:hover {
    background-color: #018884;
  }

  .manifest-preview {
    background-color: #333;
    border-color: #555;
    color: #eee;
  }
}

/* Customize the button */
esp-web-install-button {
  --esp-tools-button-border-radius: 4px;
  --esp-tools-button-color: #f3cf1b;
  --esp-tools-button-text-color: #000;
}


/* Center the container but keep content left-aligned */
.content {
  max-width: 600px;
  /* Adjust width as needed */
  margin: 0 auto;
  /* This centers the container */
  padding: 12px;
  text-align: left;
  /* Keep text left-aligned */
}

/* Center the debug section container but keep its content left-aligned */
.debug-section {
  max-width: 600px;
  /* Should match the content width */
  margin: 20px auto;
  /* Center it horizontally with space above/below */
  text-align: left;
  width: 100%;
}

/* For the manifest content */
.manifest-preview {
  text-align: left;
}

/* Make the footer centered */
.footer {
  max-width: 600px;
  margin: 24px auto;
  text-align: center;
  /* Usually footers look better centered */
}