body {
  background-color: #131722;
  margin: 0;
  padding: 0;
  height: 100vh;
}

#chart-container {
  display: grid;
  grid-gap: 2px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  height: calc(100vh - 2rem);
}

.chart {
  position: relative;
  height: 100%;
  width: 100%;
}

#nav-menu {
    display: flex;
    align-items: center;
    background-color: #131722;
    height: 2rem;
}

.nav-items {
  display: flex;
  justify-content: center;
  flex-grow: 1;
}

.logo-text {
  padding-left: 0.5rem;
  font-size: 1.5em;
  font-weight: bold;
  color: #ffffff;
  margin-right: 1em;
}

#nav-menu button {
    background-color: #202940;
    border: none;
    color: #ffffff;
    padding: 0.1rem 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    margin: 0 0.5rem;
    cursor: pointer;
}

#nav-menu label {
  background-color: #202940;
  padding: 0.1rem 1rem;
  font-size: 1rem;
  color: #ffffff;
}

#nav-menu button:hover {
    background-color: #2a365a;
}

.close-chart {
  position: absolute;
  bottom: 20px;
  right: 5px;
  background-color: #f44336;
  border: none;
  color: white;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 12px;
  width: 20px;
  height: 20px;
  line-height: 7px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.8;
}

.close-chart:hover {
  opacity: 1;
}

.modal-header {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 15px;
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4); /* Black overlay */
}

.modal-content {
  background-color: #202940;
  color: #ffffff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 4px;
  width: 400px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-input,
.modal-select,
.modal-checkbox {
  background-color: #303b54;
  border: 1px solid #303b54;
  border-radius: 4px;
  color: #ffffff;
  padding: 5px;
  outline: none;
  width: 100%;
}

.modal-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.modal-button {
  background-color: #3a7bd5;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 4px 2px;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s ease-in-out;
}

.modal-button:hover {
  background-color: #4a8fe7;
}


.modal-actions {
  text-align: right;
}

#categories button {
  margin-right: 10px;
  margin-bottom: 10px;
}

.search-result {
  cursor: pointer;
  padding: 4px;
  margin-bottom: 4px;
  background-color: #f1f3f6;
  border-radius: 4px;
}
.modal-content .search-result {
  color: #000000;
}

.search-result:hover {
  background-color: #d3dae4;
}

.search-result {
  cursor: pointer;
  padding: 4px;
  margin-bottom: 4px;
  background-color: #b7c0cb;
  border-radius: 4px;
}

#add-chart-modal {
  border-radius: 1rem;
}
#direct-input, #search-input {
  height: 1.85rem
}

/* Settings modal */

.settings-section ul {
  list-style: none;
  padding: 0.5rem;
}

.settings-section li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding: 5px 0;
}

.settings-section {
  display: flex;
  flex-direction: column;
}

.settings-field {
  margin-bottom: 1rem;
}

.settings-field label {
  display: block;
  margin-bottom: 0.5rem;
}

.settings-field select {
  width: 100%;
  padding: 0.5rem;
  box-sizing: border-box;
}

/*Indicators Modal*/
.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

#indicators-container {
  list-style-type: none;
  padding: 0;
  height: 300px;
  overflow-y: auto;
}

#indicators-container li {
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
}

#indicators-container li:last-child {
  border-bottom: none;
}

#indicators-container input[type="checkbox"] {
  margin-right: 10px;
}



@media (max-width: 700px) {
  .nav-items {
    display: none;
  }
  .logo-text:after {
    content: "☰";
    font-size: 1.7rem;
    cursor: pointer;
    padding-left: 1rem;
  }
}

@media (max-width: 700px) {
  .nav-items.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 2rem;
    left: 0;
    right: calc(100% - (100% / 2));
    background-color: #202940;
    font-size: 2rem;
    z-index: 1;
  }

  #nav-menu button,
  #nav-menu label {
    margin: 0.5rem;
  }

  #nav-menu input {
    height: 1.3rem;
    font-size: 1.1rem;
    margin: 0 1rem;
    vertical-align: middle;
  }

  #nav-menu label {
    display: inline-flex;
    justify-content: center;
  }

}

@media (max-width: 450px) {
  .modal-content {
    width: 80%;
  }
}

body, html {
  margin: 0;
  padding: 0;
  overflow: hidden; /* This can prevent scrollbars from appearing */
}
