/* styles.css */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 1rem;
  background-color: #f7f9fc;
  color: #333;
}

h1, h2 {
  text-align: center;
  color: #2c3e50;
}

form, table {
  max-width: 800px;
  margin: 1rem auto;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

form label {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
}

form input,
form select,
form button {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

form button {
  background-color: #3498db;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background-color: #2980b9;
}

#viewToggle, #riverFilter, #yearFilter {
  display: block;
  margin: 0.5rem auto;
  max-width: 300px;
  padding: 0.5rem;
  font-size: 1rem;
}

#dataTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
  position: relative;
}

#dataTable th, #dataTable td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: center;
}

#dataTable thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #ecf0f1;
}

#dataTable tfoot {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background-color: #f4f6f8;
}

@media (max-width: 600px) {
  form, table {
    padding: 0.5rem;
  }

  #dataTable th, #dataTable td {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  form input,
  form select,
  form button {
    font-size: 0.9rem;
  }

  h1, h2 {
    font-size: 1.2rem;
  }
}

.controls-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inline-fields {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.inline-fields.wide {
  width: 100%;
  gap: 2.5rem;
  justify-content: space-between;
}

.inline-fields label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 600;
  margin-bottom: 0;
  flex: 1 1 0;
  min-width: 120px;
}

.inline-fields input[type="number"],
.inline-fields input[type="date"],
.inline-fields select {
  width: 6ch;
  min-width: 0;
  max-width: 100%;
  padding: 0.3rem 0.5rem;
  font-size: 1rem;
  margin: 0.25rem 0 0 0;
  box-sizing: border-box;
}

.inline-fields input[type="date"],
.inline-fields select {
  width: 100%;
  min-width: 120px;
  max-width: 200px;
}

.controls-container.row {
  flex-direction: row;
  justify-content: center;
  gap: 3rem;
}

@media (max-width: 700px) {
  .controls-container.row {
    flex-direction: column;
    gap: 1.5rem;
  }
}

.level-yellow {
  background-color: #fff7b2 !important; /* yellow */
}
.level-pink {
  background-color: #ffd6f5 !important; /* pink */
}
.level-red {
  background-color: #ffb2b2 !important; /* red */
}

.note {
  background-color: #f8f9fa;
  border-left: 4px solid #3498db;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
}

.note p {
  margin: 0;
  color: #2c3e50;
}

td:contains("NR") {
  color: #666;
  font-style: italic;
}

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

.modal-content {
  background-color: #fff;
  margin: 7% auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  position: relative;
}

.close {
  color: #aaa;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}
.close:hover,
.close:focus {
  color: #e74c3c;
}

/* Add Data Button Styles */
.center-btn {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#addDataBtn {
  background-color: #3498db;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 0;
  transition: background 0.3s;
}
#addDataBtn:hover {
  background-color: #2980b9;
}

/* PIN Modal Specific Styles */
#pinInput {
  font-size: 24px;
  text-align: center;
  letter-spacing: 5px;
  width: 100px;
  margin: 1rem auto;
  display: block;
}

#submitPin {
  padding: 8px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 1rem;
}

#submitPin:hover {
  background-color: #2980b9;
}

.pin-container {
  text-align: center;
  padding: 1rem;
}

