/* --- General layout --- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0 20px;
  background-color: #f9f9f9;
  color: #333;
}

main {
  padding-top: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

/* --- Navigation bar --- */
nav {
  background-color: #000000;
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
}

nav a, nav .dropdown {
  color: #fff;
  text-decoration: none;
  margin-right: 15px;
}

nav a:hover {
  text-decoration: underline;
}

nav a:visited {
  color: #fff;  /* same as nav a color */
  text-decoration: none; /* optional, keeps it clean */
}

/* --- Flash messages --- */
.flashes {
  list-style: none;
  padding: 10px;
  margin-bottom: 20px;
  background-color: #ffefc0;
  border: 1px solid #f0c36d;
  border-radius: 5px;
}

.flashes li {
  margin: 5px 0;
}

/* --- Filter toggle container --- */
#filter-controls {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  font-size: 1rem;
  gap: 10px;
}

#filter-controls label {
  cursor: pointer;
}

/* --- Dashboard layout container --- */
.dashboard-container {
  display: flex;
  height: calc(100vh - 200px);
  gap: 20px;
}

/* --- Map container --- */
#map {
  flex: 2;
  height: 100% !important;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
}

/* --- Ratings panel --- */
.ratings-panel {
  flex: 1;
  overflow-y: auto;
  max-height: 100%;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

#ratings-list {
  list-style-type: none;
  padding-left: 0;
}

#ratings-list li {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
}

#ratings-list a {
  color: #333333;       /* dark gray */
  text-decoration: underline;
}

#ratings-list a:visited {
  color: #333333;       /* same dark gray */
  text-decoration: underline;
}

#ratings-list a:hover,
#ratings-list a:focus {
  color: #555555;       /* a slightly lighter gray on hover/focus */
  text-decoration: underline;
}

#ratings-list a:hover,
#ratings-list a:focus {
  text-decoration: underline;
}


/* --- Rating box styles (reusable) --- */
.rating-box {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rating-header {
  font-weight: bold;
  margin-bottom: 8px;
}

.comment {
  font-style: italic;
  margin: 10px 0;
  color: #555;
}

.category-icons {
  font-size: 18px;
  margin-top: 8px;
}

.category-icons span {
  margin-right: 15px;
  vertical-align: middle;
}

/* --- Form styles --- */
form select {
  width: 100%;
  max-width: 100px;
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 500px;
}

.form-categories > div {
  flex: 1 1 80px;
  min-width: 80px;
}

form label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}

form input[type="text"],
form input[type="number"],
form input[type="password"],
form input[type="email"],
form textarea {
  width: 100%;
  max-width: 500px;
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 15px;
}

form button[type="submit"] {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
}

form button[type="submit"]:hover {
  background-color: #2ecc71;
}

/* --- Modal styles --- */
.modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
  margin-top: 0;
  text-align: center;
  font-size: 1.4rem;
}

#matches-list {
  list-style: none;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#matches-list li {
  padding: 10px;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#matches-list li:hover {
  background-color: #f0f0f0;
}

#cancel-selection {
  margin-top: 15px;
  display: block;
  width: 100%;
  background-color: #c0392b;
  color: white;
  border: none;
  padding: 8px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

#cancel-selection:hover {
  background-color: #e74c3c;
}

/* --- Buttons --- */
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

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

.purple-button {
  background-color: #8E4585;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 7px 15px;
  font-size: 1rem;
  user-select: none;
}

.purple-button:hover {
  background-color: #7a3b72;
}

.purple-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px #b28bbe;
}

.purple-button[disabled] {
  background-color: #ccc;
  cursor: not-allowed;
}

.purple-button {
  cursor: default; /* disable pointer cursor */
}

/* --- Responsive layout --- */
@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
    height: auto;
  }

  #map {
    flex: none;
    height: 50vh !important;
  }

  .ratings-panel {
    flex: none;
    max-height: none;
  }
}

@media (max-width: 600px) {
  nav {
    font-size: 0.95rem;
    padding: 10px;
  }

  form input,
  form textarea {
    width: 100%;
  }
}

main {
  padding-top: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 40px; /* 👈 Add this line for bottom space */
}


footer {
  background-color: #000000;
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  text-align: center;
}

footer a {
  color: #fff;
  text-decoration: none;
  margin-right: 15px;
}

footer a:hover {
  text-decoration: underline;
}

footer a:visited {
  color: #fff;
  text-decoration: none;
}

/* Dropdown container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown content - hidden by default */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: black;
  min-width: 120px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

/* Links inside dropdown */
.dropdown-content a {
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
}

/* Hover effect on links */
.dropdown-content a:hover {
  background-color: #3d3d3d;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Style the dropdown button */
.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: #000;  /* Default color, overridden below */
  padding: 0;
  margin: 0;
}

/* Override dropbtn color inside nav and footer for visibility */
nav .dropbtn,
footer .dropbtn {
  color: white;
  font-weight: normal;
  cursor: pointer;
}

footer .dropdown {
  margin-right: 15px; /* same as footer a spacing */
}

/* Make footer dropdown open upwards */
footer .dropdown-content {
  bottom: 100%;       /* Position above the button */
  top: auto;          /* Cancel the default top */
  margin-bottom: 5px; /* Optional spacing */
}

