
header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: white;
  border: 2px solid black;
  padding: 6px 11px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 15px;
  color: black;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, background 0.2s;
}
 
header:hover {
  color: black;
  transform: scale(1.05);
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}
 
h1 {
  font-family: "Londrina Shadow", sans-serif;
}
 
p {
  font-family: "Aldrich", sans-serif;
  font-size: 15px;
}
 
.card {
  font-size: 10px;
  flex-wrap: wrap;
  padding: 6px 11px;
  gap: 25px;
  margin-top: 10px;
  border-radius: 15px;
  list-style: none;
  color: black;
  background-color: white;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  border: 2px solid black;
  scroll-margin-top: 30px;
  animation: fadeIn 0.2s ease-in-out;
}
 
body {
  background-color: rgb(230, 177, 177);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
 
.card:hover {
  color: black;
  transform: translateY(-25px);
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}
 
.rating {
  font-size: 10px;
  display: flex;
  flex-wrap: wrap;
  padding: 6px 11px;
  gap: 25px;
  margin-top: 10px;
  border-radius: 15px;
}
 
h2 {
  font-family: "Londrina Shadow", sans-serif;
  font-size: large;
}
 
#chat-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
 
/* Floating Toggle Button */
#chat-toggle-btn {
  background-color: white;
  font-family: "Londrina Shadow", sans-serif;
  border: 2px solid black;
  color: black;
  border-radius: 30px;
  padding: 14px 22px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
 
#chat-toggle-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(3, 3, 3, 0.45);
}
 
#chat-toggle-btn:active {
  transform: scale(0.98);
}
 
/* Chat Popup Window */
#chat-window {
  width: 340px;
  height: 460px;
  background-color: rgb(255, 255, 255);
  border-radius: 20px;
  border: 2px solid black;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
 
/* Hidden State Utility Class */
.chat-hidden {
  display: none !important;
}
 
/* Header Section */
.chat-header {
  background-color: white;
  color: black;
  font-family: "Londrina Shadow", sans-serif;
  padding: 16px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 18px rgba(230, 177, 177, 0.6) !important;
}
 
.chat-close-btn {
  background-color: white;
  border: 2px solid black;
  color: black;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.chat-close-btn:hover {
  background: white;
}
 
/* Scrollable Message Area */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: white;
  border-radius: 30px;
}
 
/* Custom Scrollbar for Messages */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background-color: white;
  border-radius: 10px;
}
 
/* Chat Message Bubbles */
.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-line;
  animation: fadeIn 0.25s ease-in-out;
}
 
.bot-msg {
  background-color: white;
  color: black;
  font-family: "Aldrich", sans-serif;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid rgb(0, 0, 0);
}
 
.user-msg {
  background-color: white;
  color: black;
  align-self: flex-end;
  font-family: "Aldrich", sans-serif;
  border-bottom-right-radius: 4px;
  border: 1px solid black;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.2);
}
 
/* Options / Buttons Area at Bottom */
.chat-input-area {
  padding: 12px;
  border-top: 1px solid black;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  background-color: white;
}
 
/* Priority Option Buttons */
.option-btn {
  background-color: rgb(255, 255, 255);
  border: 1px solid black;
  color: black;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}
 
.option-btn:hover {
  transform: translateX(2px);
}
 
.option-btn:active {
  transform: scale(0.96) translateY(1px);
  background-color: #f3f3f3;
  transition: transform 0.05s ease;
}
 
/* Smooth fade-in animation for new messages */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
 
.btn-hidden {
  display: none !important;
}
 
.card-highlight {
  animation: cardPulse 0.6s ease-in-out 2 alternate;
  border-color: rgb(230, 177, 177) !important;
  box-shadow: 0 0 18px rgba(230, 177, 177, 0.4) !important;
}
 
@keyframes cardPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
 
.specialty {
  background-color: white;
  border: 1.5px solid black;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: bold;
  display: inline-block;
  transition: transform 0.2s ease, background-color 0.2s ease;
  cursor: default;
}
 
.specialty:hover {
  transform: scale(1.05);
  background-color: #fff3f3;
}
 
.typing-indicator {
  font-style: italic;
  opacity: 0.7;
  animation: pulseOpacity 1s infinite alternate;
}
 
@keyframes pulseOpacity {
  from { opacity: 0.4; }
  to { opacity: 0.9; }
}
 
#chat-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.25);
  z-index: 9998; /* Just behind the chat container */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
 
#chat-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
 
/* Subtle star glow on card hover */
.stars {
  color: #f59e0b;
  transition: letter-spacing 0.2s ease;
}
 
.card:hover .stars {
  letter-spacing: 1px;
}
 
.search-container {
  margin: 15px 0;
  width: 100%;
}
 
.search-input-wrap {
  position: relative;
  width: 90%;
}
 
#store-search {
  width: 100%;
  padding: 12px 40px 12px 16px;
  font-family: "Aldrich", sans-serif;
  font-size: 14px;
  border: 2px solid black;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  outline: none;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
 
#store-search:focus {
  border-color: #222;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
 
/* QoL: Clear (X) button sitting inside the search field */
.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid black;
  color: black;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
 
.search-clear-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background-color: #fff3f3;
}
 
/* QoL: Live "N stores found" counter under the search bar */
.search-results-count {
  font-family: "Aldrich", sans-serif;
  font-size: 12px;
  margin: 6px 0 0 4px;
  opacity: 0.75;
  min-height: 14px;
}
 
.container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 10px;
}
 
/* QoL: "No results" empty state for the search filter */
.no-results-msg {
  font-family: "Aldrich", sans-serif;
  text-align: center;
  color: black;
  background-color: white;
  border: 2px dashed black;
  border-radius: 15px;
  padding: 20px;
  margin-top: 10px;
  display: none;
}
 
.no-results-msg.visible {
  display: block;
}
 
/* QoL: Better accessibility outline focus for keyboard navigation */
button:focus-visible,
input:focus-visible {
  outline: 2px solid black;
  outline-offset: 2px;
}
 
/* QoL: highlighted search term inside card text */
mark {
  background-color: rgb(230, 177, 177);
  color: black;
  border-radius: 3px;
  padding: 0 2px;
}
 
/* QoL: one-time attention pulse to draw first-time visitors to the chat button */
.attention-pulse {
  animation: attentionPulse 1.4s ease-in-out 3;
}
 
@keyframes attentionPulse {
  0% { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(230, 177, 177, 0.7); }
  50% { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 10px rgba(230, 177, 177, 0); }
  100% { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(230, 177, 177, 0); }
}
 
@media print {
  #chat-widget-container,
  .search-container {
    display: none !important;
  }
 
  body {
    background-color: white !important;
  }
 
  .card {
    break-inside: avoid;
    box-shadow: none !important;
  }
}