/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background-color: #333;
  color: #ddd;
  display: flex;
  flex-direction: column;
  background-image: url('./images/pexels-suzyhazelwood-1629236.jpg'); /* Replace with your image path */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Fixed background for desktop */
}

/* In styles.css */

.container {
  display: flex;
  flex: 1;
  min-height: 0; /* Add this line */
}

.left-panel {
  flex: 1;
  padding: 20px;
  background-color: rgba(68, 68, 68, 0.8);
  border-right: 2px solid #555;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Add this line */
  min-height: 0; /* Add this line */
}

.middle-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: rgba(58, 58, 58, 0.8);
  min-height: 0; /* Add this line */
}

.right-panel {
  flex: 1;
  padding: 20px;
  background-color: rgba(68, 68, 68, 0.8);
  border-left: 2px solid #555;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Add this line */
  min-height: 0; /* Add this line */
}

.search-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.search-controls {
  display: flex;
  gap: 10px;
  align-items: center; /* Align items vertically */
}

button, select, #resultsLimit {
  height: 50px; /* Increased height for buttons */
  padding: 15px 20px; /* Increased padding for buttons */
  border-radius: 4px;
  font-size: 14px;
  line-height: 1; /* Ensure text is vertically centered */
  box-sizing: border-box;
  flex: 1;
  margin: 0;
}

button {
  background-color: #50C878; /* Mint green */
  color: #333;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #40A060; /* Darker green on hover */
}

select, #resultsLimit {
  border: 1px solid #555;
  background-color: #666;
  color: #ddd;
  cursor: pointer;
}

select:hover, #resultsLimit:hover {
  background-color: #777;
}

/* Ensure the input box aligns perfectly */
#resultsLimit {
  display: flex;
  align-items: center; /* Center text vertically */
  justify-content: center; /* Center text horizontally */
}

#map {
  flex: 1;
  border-radius: 4px;
}

input, textarea {
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #666;
  color: #ddd;
  width: 100%;
  box-sizing: border-box;
}

#costEstimation {
  margin-top: auto;
  padding: 20px;
  background-color: rgba(85, 85, 85, 0.8); /* Add transparency */
  border-radius: 4px;
  margin-bottom: 30px; /* Added space below */
}

#costDisplay {
  font-size: 24px;
  font-weight: bold;
  color: #50C878;
  margin-top: 10px;
}

.shop {
  background-color: rgba(85, 85, 85, 0.8); /* Add transparency */
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 10px;
  cursor: pointer; /* Change cursor to pointer */
  transition: background-color 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop:hover {
  background-color: rgba(100, 100, 100, 0.8); /* Slightly lighter on hover */
}

.shop-details {
  flex: 1; /* Allow the details to take up remaining space */
}

.click-here {
  color: #50C878;
  font-weight: bold;
  margin-left: 20px; /* Add some spacing between details and "Click here" */
  white-space: nowrap; /* Prevent text from wrapping */
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    overflow: auto; /* Enable scrolling for mobile */
    height: auto;
    min-height: 100vh; /* Ensure body covers the full viewport height */
    background-attachment: scroll; /* Allow background to scroll on mobile */
  }

  .container {
    flex-direction: column;
    height: auto;
    min-height: 100vh; /* Ensure container covers the full viewport height */
  }

  .left-panel, .middle-panel, .right-panel {
    flex: none;
    width: 100%;
    border-right: none;
    border-left: none;
    border-bottom: 2px solid #555;
    height: auto; /* Allow panels to grow with content */
  }

  .search-controls {
    flex-direction: column;
  }

  #map {
    height: 300px; /* Fixed height for mobile */
    flex: none; /* Prevent map from growing */
  }

  /* Fix for fixed background on mobile */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./images/pexels-suzyhazelwood-1629236.jpg'); /* Same background image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1; /* Place behind other content */
  }
}

/* Add to styles.css */
.top-bar {
  position: static; /* Change from fixed to static */
  width: 100%;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(to right, 
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 100%);
}

.logo {
  font-weight: bold;
  font-size: 24px;
  color: #50C878;
  text-shadow: 0 0 10px rgba(80, 200, 120, 0.3);
}

.nav-middle {
  flex-grow: 1;
  text-align: center;
  color: #50C878;
}

.nav-right button {
  background: rgba(80, 200, 120, 0.3);
  border: 1px solid #50C878;
  padding: 8px 20px;
  border-radius: 20px;
  color: #50C878;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-right button:hover {
  background: #50C878;
  color: #333;
}

/* Authentication Modal Styles */
.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

.auth-content {
  background: #444;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.auth-content h2 {
  margin-bottom: 20px;
}

.auth-content input {
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
}

.auth-content button {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
}

.auth-content p {
  margin-top: 15px;
  text-align: center;
}

.auth-content a {
  color: #50C878;
  cursor: pointer;
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* add slide button*/
/* --------------- */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.toggle-label {
  color: #888;
  font-size: 0.9em;
  white-space: nowrap;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #666;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: #ddd;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #50C878;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
