body {
  margin: 0;
  font-family: "Nunito", "Roboto", Arial, sans-serif;
  background-color: #f9fafb;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#site-name {
  font-size: 3rem;
  font-weight: 800;
  color: #000000;
  margin: 0;
  text-align: center;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1#main-title {
  color: #374151;
  overflow: hidden;
  border-right: 0.15em solid #374151;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #374151;
  }
}

#main-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 600px;
}

/* Color spans container */
body > div:first-of-type {
  display: flex;
  gap: 10px;
  justify-content: center;
}

span {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
}

/* Search container styling */
#search_container {
  width: 90%; /* responsive width */
  max-width: 500px; /* limit width on large screens */
  padding: 30px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  text-align: center; /* center children horizontally */
  display: flex;
  flex-direction: column; /* stack children vertically */
  gap: 20px;
}

/* Button styling */
.fancy-btn {
  padding: 12px 20px;
  background-color: #1f2937;
  color: #f9fafb;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.fancy-btn:hover {
  background-color: #374151;
  transform: translateY(-2px);
}

/* Footer h2 styling */
h2 {
  font-size: 1.5rem;
  color: #374151;
  text-align: center;
  margin-top: 40px;
}

#c1 {
  color: #2563eb;
  font-weight: bold;
  font-size: 50px;
}
#c2 {
  color: #f59e0b;
  font-weight: bold;
  font-size: 50px;
}
#c3 {
  color: #f9fafb;
  font-weight: bold;
  font-size: 50px;
}
#c4 {
  color: #ffffff;
  font-weight: bold;
  font-size: 50px;
}
#c5 {
  color: #111827;
  font-weight: bold;
  font-size: 50px;
}

/* Res page hidden by default */
#res-page {
  display: none;
  width: 100%;
  height: 100vh;
}

/* Flex layout when shown */
#res-page.show {
  display: flex;
  flex-direction: row;
  align-items: stretch; /* both columns equal height */
  gap: 2rem; /* consistent spacing between map + panel */
  padding: 2rem; /* balanced page padding */
  box-sizing: border-box;
  background: #f9fafb;
}

#map {
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex: 2.5;
}

#right-pane {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* aslkdfj;laksjdfl;askjdf;aksjdf;lakjs;ldfja;lsdfjkl */
#results-page-top-right {
  height: 20vh;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  background: #fafafa;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.summary-overview-el {
  flex: 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-overview-el h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: bold;
  color: #9bc1bc;
}

.summary-overview-el p {
  margin: 0;
  font-size: 0.95rem;
  color: #374151; /* a clean neutral gray */
}
.open-analysis-modal-btn {
  padding: 0.6rem 1.2rem;
  background: transparent;
  border: 2px solid #9bc1bc;
  color: #9bc1bc;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.open-analysis-modal-btn:hover {
  background: #9bc1bc;
  color: #fff;
}

.open-analysis-modal-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/*                      a;sldkfj;laskjdf lj  */

#cafe-results-panel {
  height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
  background: #fafafa;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Chrome/Edge/Safari custom scrollbar */
#info-panel::-webkit-scrollbar {
  width: 8px;
}
#info-panel::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
#info-panel::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 10px;
}
#info-panel::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

.cafe_result {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.cafe_result:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cafe_display_name {
  color: #9bc1bc;
  font-weight: bold;
}

.cafe_result > p {
  margin: 0 0 5px 0;
}

.cafe_result_location_price_detail {
  display: flex;
  gap: 10px;
}

.cafe_result_rating {
  display: flex;
  gap: 0.5em;
}
.cafe_result_stars > span {
  padding: 0;
}
.fa-star {
  color: gold;
}

.popup-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.popup-title {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.view-details-btn {
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
}

.view-details-btn:hover {
  background-color: #0056b3;
}

.modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 50px auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  min-width: 400px;
  min-height: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#modal-close,
#analysis-modal-close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  position: relative;
  z-index: 10;
}
.modal-body-bottom-container {
  display: flex;
}
.modal-body-con-left,
.modal-body-con-right {
  flex: 1 1 0;
  width: 50%;
  padding: 0 15px;
  box-sizing: border-box;
}

#modal-item-display-name {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.5px;
}

#modal-item-addr-line,
#modal-item-phone-line,
#modal-item-price-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.modal-item-hours-dropdown {
  width: 100%;
  margin: 10px 0;
  font-size: 14px;
}
.modal-item-hours-dropdown.open .modal-item-hours-list {
  opacity: 1;
}

.modal-item-hours-toggle {
  width: 100%;
  background: linear-gradient(135deg, #f9f9f9, #f1f1f1);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.modal-item-hours-toggle:hover {
  background: linear-gradient(135deg, #f1f1f1, #e9e9e9);
  transform: translateY(-1px);
}

.modal-item-hours-list {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  padding-left: 10px; /* indent for elegance */
  border-left: 2px solid #eee;
  margin-top: 6px;
}

.modal-item-hours-list p {
  margin: 3px 0;
  display: flex;
  gap: 6px; /* space between spans */
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #444;
}

.modal-item-hours-list p:hover {
  color: #000;
}

.status-open {
  color: green;
  font-weight: 600;
}
.status-closed {
  color: goldenrod;
  font-weight: 600;
}

.modal-item-hours-list p .day {
  width: 50px; /* fixed width for all day names to align times */
  font-weight: 600;
}

.modal-item-hours-list p .open-time {
  color: green;
  font-weight: 500;
}

.modal-item-hours-list p .close-time {
  color: goldenrod;
  font-weight: 500;
}

/* --- Mobile Friendly Adjustments --- */
@media (max-width: 430px) {
  body {
    margin: 0;
    /* padding: 2.75em; */
  }
  #site-name {
    font-size: 2rem;
    letter-spacing: 0.03em;
  }

  h1#main-title {
    font-size: 1.25rem;
    letter-spacing: 0.1em;
  }

  #main-page {
    gap: 15px;
    padding: 20px;
  }

  #search_container {
    width: 85%;
    padding: 20px;
    gap: 15px;
  }

  .fancy-btn {
    font-size: 14px;
    padding: 10px 16px;
  }

  span {
    padding: 4px 8px;
  }
}

/* styling for the cirlce lol */

@keyframes progress {
  0% {
    --percentage: 0;
  }
  100% {
    --percentage: var(--value);
  }
}

@property --percentage {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.progress-circle {
  --percentage: var(--value);
  --primary: #008080;
  --secondary: #d0f0f0;

  --size: 250px;
  animation: progress 2s 0.5s forwards;
  width: var(--size);
  aspect-ratio: 1;
  background: rgb(255, 255, 255);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: calc(var(--size) / 5);
}
.progress-circle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(
    var(--primary) calc(var(--percentage) * 1%),
    var(--secondary) 0
  );
  mask: radial-gradient(white 55%, #f9f9f9 0);
  mask-mode: alpha;
  -webkit-mask: radial-gradient(#0000 55%, #000 0);
  -webkit-mask-mode: alpha;
}

.progress-circle::after {
  /* counter-reset: percentage var(--value);
  content: counter(percentage) '%'; */
  font-family: Helvetica, Arial, sans-serif;
  font-size: calc(var(--size) / 5);
  color: var(--primary);
}

/* dropdown label section.... */
/* Label styling */
.dropdown-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

/* Select styling */
.dropdown-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  appearance: none; /* removes default arrow in some browsers */
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
}

/* Focus state */
.dropdown-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
  outline: none;
}

/* Optional: custom arrow */
.dropdown-select-wrapper {
  position: relative;
}
.dropdown-select-wrapper::after {
  /* content: "▼"; */
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: #666;
}

.analysis-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #4f46e5;
  text-align: center;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}
