@import url('https://fonts.googleapis.com/css2?family=Bagel+Fat+One&display=swap');

/* Stack content vertically and push footer to bottom */
body {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-top: 4rem;
}

/* Layout: card-style main content area */
main {
  flex: 1 0 auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background-color: rgba(255, 255, 255, 0.44);
  box-shadow: var(--box-shadow-glass);
  border-radius: 1.2rem;
  max-width: 640px;
  width: 100%;
  padding: 2rem 2rem 1.5rem;
  margin: 0 auto;
}

main h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
  text-align: left;
  padding: 0;
}

main .tool-label {
  font-weight:500;
  letter-spacing: -0.4pt;
  color: rgba(0, 0, 0, 0.8);
}

h2 {
  margin-bottom: 0.8rem;
}

h3 {
  margin-bottom: 0.7rem;
}

h4 {
  margin-bottom: 0.6rem;
}

h5 {
  margin-bottom: 0.5rem;
}

#preamble {
  word-break: keep-all;
}

#preamble-hero {
  text-align: center;
  display: flex;
  align-items: center;
  flex-flow: column;
  padding: 0.2rem 0 1.6rem;
}

#app-title {
  font-size: 3rem;
  font-family: "Bagel Fat One";
  letter-spacing: -1pt;
  padding-right: 2pt;
  line-height: 1;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, #d55c2f 0%, #e89934 60%, #f3bf17 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(180, 80, 30, 0.28));
}

#app-slogan {
  font-size: 1.1rem;
  letter-spacing: -0.5pt;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 0.8rem;
  text-shadow: none;
  padding: 0;
}

#app-desc {
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.8);
  line-height: 1.55;
  text-shadow: none;
  padding: 0 1rem;
  margin-bottom: 0;
  word-break: keep-all;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

#app-title-slogan {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

/* alternative #app-title-slogan for narrower displays */
@media (max-width: 480px) {
  #app-title-slogan {
    flex-flow: column wrap;
    align-items: center;
    margin-bottom: 0.3rem;
  }
}

#geo-output {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
}

#searchbox {
  display: flex;
  border-radius: 0.8rem;
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: var(--box-shadow-glass);
  overflow: hidden;
}

#searchbox input[type="search"] {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 0;
  font-size: 1rem;
  background: transparent;
  outline: none;
  color: inherit;
  width: 16px; /* what the hack??? */
}

#searchbox input[type="search"]::placeholder {
  color: rgba(0, 0, 0, 0.38);
}

#searchbox:focus-within {
  background-color: rgba(255, 255, 255, 0.75);
}

#venue-search-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0.6rem 0.9rem;
  font-size: 1rem;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.5);
  transition: color 0.12s ease;
}

#venue-search-btn:hover {
  color: rgba(0, 0, 0, 0.85);
}

keyword-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.75rem;
  padding: 0.5rem 0;
}

keyword-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  aspect-ratio: 1;
  border-radius: 1.2rem;
  padding: 0.5rem 0.3rem 0.4rem;
  cursor: pointer;
  user-select: none;
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: var(--box-shadow-glass);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

keyword-button img {
  width: 62%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: 0.2rem;
}

keyword-button i {
  font-size: 1.65rem;
  color: rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

keyword-button span {
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
  word-break: keep-all;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.75);
}

keyword-button:active {
  transform: scale(0.88);
  box-shadow: var(--box-shadow-glass-insetonly);
}

main section {
  margin-bottom: 1.5em;
}

list-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.venue-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  align-items: baseline;
  padding: 0.6rem 1rem;
  background-color: rgba(255, 255, 255, 0.55);
  border-radius: 0.8rem;
  box-shadow: var(--box-shadow-glass-insetonly);
  text-decoration: none;
  color: inherit;
}

.venue-main {
  display: contents;
}

.venue-name {
  grid-column: 1;
  grid-row: 1;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-type {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.7);
  min-height: 1em;
}

.venue-meta {
  display: contents;
}

.venue-rating {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  gap: 0.33rem;
  align-self: center;
  justify-self: end;
}

.rating-pip {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.3);
}

.rating-pip--filled {
  border-color: transparent;
}

.venue-rating[data-rating="1"] .rating-pip--filled { background-color: #d4a827; }
.venue-rating[data-rating="2"] .rating-pip--filled { background-color: #4caf6e; }
.venue-rating[data-rating="3"] .rating-pip--filled { background-color: #1175f5; }

.venue-distance {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.7);
  justify-self: end;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 0.0 0;
}

.loading-spinner::after {
  content: '';
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: #d4892a;
  border-right-color: #c8a020;
  animation: spinner-spin 0.8s ease-in-out infinite;
}

@keyframes spinner-spin {
  to { transform: rotate(360deg); }
}

.list-status {
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.7);
  text-align: center;
  padding: 1rem 0;
}

.list-error {
  color: #c0392b;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.section-header-row h3 {
  margin-bottom: 0;
}

#nearby-more-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: none;
  border-radius: 0.8rem;
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: var(--box-shadow-glass-insetonly);
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

#nearby-more-btn:hover {
  background-color: rgba(255, 255, 255, 0.75);
  color: rgba(0, 0, 0, 0.8);
}

#nearby-refresh-btn {
  border: none;
  background: transparent;
  padding: 0.25rem 0.4rem;
  font-size: 0.95rem;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.4);
  transition: color 0.12s ease, transform 0.2s ease;
}

#nearby-refresh-btn:hover {
  color: rgba(0, 0, 0, 0.75);
}

#nearby-refresh-btn:disabled {
  cursor: default;
  color: rgba(0, 0, 0, 0.25);
}
