/* These are for the add note popup */
.note-modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.note-modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
}

.noteClose {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.noteClose:hover,
.noteClose:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#noteText {
  width: 100%;
  height: 150px;
  padding: 10px;
  box-sizing: border-box;
  font-size: 16px;
}

.styled-button {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  /* Remove underline */
  display: inline-block;
  /* Make the container inline */
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 12px;
  transition: background-color 0.3s, box-shadow 0.3s;
  /* Animation */
}

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

.pink-background {
  background-color: pink;
}

.styled-button:hover {
  background-color: #45a049;
  /* Darker green on hover */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  /* Shadow on hover */
}


/* These are for the Options popup */
.open-button {
  background-color: ivory;
  color: black;
  padding: 5px 5px;
  cursor: pointer;
  border: 1px solid gray;
}

.routes-popup {
  background: linear-gradient(to bottom right, #ffffff, #f0f0f0);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  padding: 20px;
  min-width: 250px;
}

.popup-header {
  color: #2c3e50;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 2px solid #3498db;
}

.route-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-option {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.route-option:hover {
  background-color: #e9ecef;
  transform: translateX(5px);
}

/* Different colors for different routes */
.route-option:nth-child(1) {
  border-left-color: #e74c3c;  /* Madrid - red */
}

.route-option:nth-child(2) {
  border-left-color: #2ecc71;  /* Invierno - green */
}

.route-option:nth-child(3) {
  border-left-color: #3498db;  /* Portuguese - blue */
}

.route-option input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.route-option label {
  color: #2c3e50;
  font-size: 1.1em;
  cursor: pointer;
  flex-grow: 1;
}

/* Custom checkbox styling */
.route-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #3498db;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s ease;
}

.route-option input[type="checkbox"]:checked {
  background-color: #3498db;
  position: relative;
}

.route-option input[type="checkbox"]:checked::before {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Hover effects */
.route-option:hover input[type="checkbox"] {
  border-color: #2980b9;
}

.route-option:hover label {
  color: #2980b9;
}

.view-popup {
  display: none;
  position: fixed;
  top: 50px;
  left: 0px;
  border: 3px solid #f1f1f1;
  z-index: 2000; /* above sticky header and content */
  /*max-width: 300px;*/
  padding: 10px;
  background-color: white;
}

/* Ensure leg management popup is visible and placed conveniently */
#legManagementPopup {
  z-index: 2001;
}

/* Arrow pointer for leg management popup */
#legManagementPopup::before,
#legManagementPopup::after {
  content: '';
  position: absolute;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
#legManagementPopup::before {
  /* border */
  top: -10px;
  left: var(--arrow-left, 18px);
  border-bottom: 10px solid #cfd8e3; /* subtle border color */
}
#legManagementPopup::after {
  /* fill */
  top: -9px;
  left: calc(var(--arrow-left, 18px) + 1px);
  border-bottom: 9px solid #ffffff; /* popup fill */
}

/* Set a style for the submit/login button */
.view-popup .btn {
  background-color: #04AA6D;
  color: white;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom: 10px;
  opacity: 0.8;
}

/* Add a red background color to the cancel button */
.view-popup .cancel {
  background-color: red;
}

/* Add some hover effects to buttons */
.view-popup .btn:hover,
.open-button:hover {
  opacity: 1;
}

.date-choices {
  margin: 10px;
  padding: 10px;
  background-color: white;
}

#datePopup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f9f9f9;
  padding: 20px;
  border: 1px solid #888;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

.date-popup {
  background: linear-gradient(to bottom right, #ffffff, #f0f0f0);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  padding: 20px;
  min-width: 300px;
}

.date-header {
  color: #2c3e50;
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

.date-choices {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.date-choices input[type="date"] {
  padding: 10px;
  border: 2px solid #3498db;
  border-radius: 6px;
  font-size: 1.1em;
  width: 200px;
  color: #2c3e50;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.date-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.1s, box-shadow 0.1s;
}

.date-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.confirm-btn {
  background-color: #2ecc71;
  color: white;
}

.cancel-btn {
  background-color: #e74c3c;
  color: white;
}

/* Optional: Style the date picker dropdown arrow */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  padding: 5px;
  filter: invert(0.5);
}

.options-panel {
  background: linear-gradient(to bottom right, #ffffff, #f0f0f0);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  padding: 20px;
  min-width: 300px;
}

.options-header {
  color: #2c3e50;
  font-size: 1.3em;
  font-weight: bold;
  text-align: center;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 2px solid #3498db;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.checkbox-group:hover {
  background-color: #e9ecef;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group label {
  color: #2c3e50;
  font-size: 1.1em;
  cursor: pointer;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.option-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  color: white;
}

.option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.option-btn.primary {
  background-color: #3498db;
}

.option-btn.secondary {
  background-color: #2ecc71;
}

.option-btn.warning {
  background-color: #e74c3c;
}

.option-btn.success {
  background-color: #f39c12;
}
