/* Basic Placeholder Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

header {
  background-color: #333;
  color: white;
  padding: 1rem;
  text-align: center;
}

main {
  flex: 1;
  display: flex;
}

/* Login page */
main.loginPage {
  margin: 2rem auto;
  padding: 0 1rem;
  flex-direction: column;
}

/* Dashboard page */
main.dashboardPage {
  flex-direction: row;
  overflow: hidden;
}

main.settingsPage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

main.notFoundPage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1rem;
}

button, .button {
  background-color: #007bff;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

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

.formSubmit:hover {                                                                                                                   
      background-color: #0056b3;                                                                                                        
  }

.mainForm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 300px;
  margin: 2rem auto;
  padding: 1rem;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mainForm input[type="text"],
.mainForm input[type="password"] {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.formSubmit {
  background-color: #007bff;
  color: white;
  padding: 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#errorMessage {
  color: red;
  text-align: center;
  margin-top: 0.5rem;
}

.formError {
  color: red;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.formSuccess {
  color: green;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.tierBtn.active {
  background-color: #0056b3;
  font-weight: bold;
}

.loginContainer > button {
  display: block;
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
}

.widgetContainer {
  color: hsl(237, 23%, 15%);
  background-color: hsl(234, 46%, 69%);
  border: 1px dotted black;
  width: fit-content;
}

.dashboardContainer {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.widgetArea {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.sidePanel {
  width: 250px;
  background-color: #e0e0e0;
  padding: 1rem;
  flex-shrink: 0;
  border-left: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidepanelSection h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 0.5rem;
}

.dashboardListItem {
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

.dashboardListItem:hover {
  background-color: #d0d0d0;
}

.dashboardListItem.active {
  background-color: #bbb;
  font-weight: bold;
}

.dashboardListItem h3 {
  font-size: 0.9rem;
  font-weight: normal;
}

.widgetListItem {
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border: 1px dashed #999;
  cursor: grab;
  background-color: #f0f0f0;
  margin-bottom: 0.4rem;
}

.widgetListItem:hover {
  background-color: #e8e8e8;
}

.widgetListItem h3 {
  font-size: 0.9rem;
  font-weight: normal;
}

.statusIndicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.statusIndicator.healthy {
  background-color: green;
}

.statusIndicator.unhealthy {
  background-color: rgb(223, 148, 51);
}

.statusIndicator.down {
  background-color: red;
}

#app {
  flex: 1;
  display: flex;
}

/* Modal */
.modalBackdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: white;
  border-radius: 6px;
  padding: 1.5rem;
  width: 360px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal h2 {
  font-size: 1.1rem;
  color: #333;
}

.addWidgetModal {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.addWidgetModal label {
  font-size: 0.85rem;
  color: #555;
}

.addWidgetModal input[type="text"] {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
}

.modalButtons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.modalButtons button[type="button"] {
  background-color: #aaa;
}

.modalButtons button[type="button"]:hover {
  background-color: #888;
}

#deleteButton{
  background-color: #ff080088;
  border: 2px solid #ff0800b6;
  color: white;
  transition: background-color 0.15s ease;
}

#deleteButton:hover:not(:disabled){
  background-color: #ff0800cc;
}

#deleteButton:disabled,
.modalButtons button[type="button"]:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.dashboardNameHighlight{
  color: #ff0800b6;
  font-weight: 600;
}

.modalError{
  color: #ff0800b6;
  font-size: 0.85rem;
  margin: 0;
}