body {
  background-color: #f8f9fa; /* Light grey background */
}

h1 {
  font-size: 1.5rem;
  font-style: italic;
  color: #0d6efd; /* Bootstrap primary blue */
  font-weight: bold;
}

p {
  font-size: 1rem;
  text-align: justify;
  color: #000000;
}

.error {
  font-size: 1.3rem;
  color: red;
  text-align: left;
}

.small {
  font-size: 0.75rem;
}

pre {
  font-family: Courier, monospace;
}

textarea {
  width: 100%;
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.85); /* Transparent white background */
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ced4da; /* Light border */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
}

.input {
  font-size: 1rem;
  font-weight: bold;
}

.output {
  font-size: 0.875rem;
  overflow-x: auto; /* Enable horizontal scrolling if necessary */
}

.print {
  font-size: 0.875rem;
  font-style: italic;
}

td {
  text-align: left;
  vertical-align: top;
}

button,
.input[type="submit"] {
  font-size: 1rem;
  font-weight: bold;
  background-color: #0d6efd; /* Bootstrap primary */
  color: white;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  border: none;
  transition: background-color 0.2s;
}

button:hover,
.input[type="submit"]:hover {
  background-color: #0056b3; /* Darker primary blue */
}

.output table {
  width: 100%; /* Stretch table to fit container */
  table-layout: auto; /* Columns resize dynamically */
  border-collapse: collapse; /* Optional: Remove double borders */
}

.output td, .output th {
  padding: 0.5rem; /* Add padding for readability */
  word-wrap: break-word; /* Break long words if needed */
  white-space: normal; /* Allow wrapping inside cells */
  overflow-wrap: anywhere; /* Break content at any point */
  border: 1px solid #dee2e6; /* Optional: Borders for table structure */
}

/* New Styles for Dropdown Menus */
.dropdown-menu {
  max-height: 300px;
  overflow-y: auto; /* Enable scrolling for long lists */
}

/* Styles for TPL Button */
#tpl-button {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  background-color: #0d6efd;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
}

#tpl-button:hover {
  background-color: #0056b3;
}

/* Styles for Calculator */
.calculator {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  height: 150px;
}

.calculator button {
  flex: 1 1 30%; /* Three buttons per row */
  margin: 2px;
  font-size: 1.2rem;
  height: calc(33.33%);
  text-align: center;
}

