* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F7F5F2;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.chat-container {
  width: 100%;
  max-width: 700px;
  height: 90vh;
  background: white;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: #2B3139;
  color: white;
  padding: 24px;
  text-align: center;
}

.logo {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-open {
  color: #FF4A1C;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  vertical-align: super;
  margin-right: 2px;
}

.logo-grub {
  color: #ffffff;
  font-weight: 700;
}

.chat-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.highlight {
  color: #FF4A1C;
}

.tagline {
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.4;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FF4A1C;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.message-content {
  background: #E9E2D8;
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 75%;
  line-height: 1.5;
}

.user-message .message-content {
  background: #FF4A1C;
  color: white;
}

.message-content p {
  margin: 0 0 8px 0;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.restaurant-card {
  background: white;
  border: 1px solid #E9E2D8;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
  transition: all 0.2s ease;
}

.restaurant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.restaurant-name {
  font-weight: 600;
  color: #FF4A1C;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.open-now-tag {
  display: inline-block;
  background: #9AF36A;
  color: #1F2329;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.restaurant-info {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 2px 0;
}

.restaurant-rating {
  color: #f59e0b;
  font-weight: 500;
}

.restaurant-price {
  color: #FF4A1C;
  font-weight: 500;
}

.map-links {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #E9E2D8;
  color: #1F2329;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
  border: 1px solid #E9E2D8;
}

.map-link:hover {
  background: #FF4A1C;
  color: white;
  border-color: #FF4A1C;
  transform: translateY(-1px);
}

.order-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.order-link.doordash {
  background: #FF3008;
  color: white;
  border-color: #FF3008;
}

.order-link.doordash:hover {
  background: #E02900;
  border-color: #E02900;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 48, 8, 0.3);
}

.order-link.ubereats {
  background: #06C167;
  color: white;
  border-color: #06C167;
}

.order-link.ubereats:hover {
  background: #05A857;
  border-color: #05A857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(6, 193, 103, 0.3);
}

.order-link.opentable {
  background: #DA3743;
  color: white;
  border-color: #DA3743;
}

.order-link.opentable:hover {
  background: #B82B35;
  border-color: #B82B35;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(218, 55, 67, 0.3);
}

.summary-toggle {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #FFE5DD 0%, #FFD0C2 100%);
  color: #FF4A1C;
  border-radius: 12px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  border: 1px solid rgba(255, 74, 28, 0.2);
  box-shadow: 0 2px 6px rgba(255, 74, 28, 0.15);
  position: relative;
  animation: subtlePulse 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
}

@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(255, 74, 28, 0.15);
  }
  50% {
    box-shadow: 0 2px 10px rgba(255, 74, 28, 0.25);
  }
}

.summary-toggle:hover {
  background: linear-gradient(135deg, #FFD0C2 0%, #FFBAA8 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(255, 74, 28, 0.3);
  animation: none;
}

.summary-content {
  margin-top: 10px;
  padding: 10px;
  background: #F7F5F2;
  border-left: 3px solid #FF4A1C;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #1F2329;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

.delivery-toggle {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: #E9E2D8;
  color: #1F2329;
  border: none;
  border-radius: 12px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
}

.delivery-toggle:hover {
  background: #FF4A1C;
  color: white;
  transform: translateY(-1px);
}

.delivery-options {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  animation: slideDown 0.3s ease;
}

.add-to-list-btn-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: white;
  color: #FF4A1C;
  border: 1.5px solid #FF4A1C;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  line-height: 1;
  white-space: nowrap;
}

.add-to-list-btn-new:hover {
  background: #FF4A1C;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 74, 28, 0.25);
}

.add-to-list-btn-new.in-list {
  background: #9AF36A;
  color: #1F2329;
  border-color: #9AF36A;
}

.add-to-list-btn-new.in-list:hover {
  background: #82d952;
  border-color: #82d952;
  color: #1F2329;
  transform: translateY(-1px);
}

/* Floating Share FAB - True Floating Button */
.share-list-float {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fabBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: calc(100vw - 32px);
}

@keyframes fabBounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.share-list-bar {
  background: linear-gradient(135deg, #FF4A1C 0%, #e63d0f 100%);
  color: white;
  padding: 14px 24px;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(255, 74, 28, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  min-width: 180px;
  justify-content: space-between;
}

.share-list-bar:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 74, 28, 0.45);
}

.share-list-bar:active {
  transform: scale(0.98);
}

.share-list-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.share-list-emoji {
  font-size: 1.3rem;
  line-height: 1;
}

.share-list-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.share-list-title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.95;
}

.share-list-count {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.share-list-view-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.share-list-view-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Share List Panel (Expanded View) */
.share-list-panel {
  position: fixed;
  bottom: 110px;
  right: 24px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-height: 500px;
  width: 360px;
  max-width: calc(100vw - 48px);
  overflow: hidden;
  animation: slideUpPanel 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpPanel {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.share-list-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: white;
  border-bottom: 1px solid #E9E2D8;
}

.share-list-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1F2329;
}

.close-panel-btn {
  background: #E9E2D8;
  border: none;
  color: #1F2329;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  font-weight: 600;
}

.close-panel-btn:hover {
  background: #D4CCC0;
  transform: rotate(90deg);
}

.share-list-items {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  background: #F7F5F2;
}

.share-list-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: white;
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #E9E2D8;
  transition: all 0.2s ease;
}

.share-list-mini-card:hover {
  border-color: #FF4A1C;
  box-shadow: 0 2px 8px rgba(255, 74, 28, 0.1);
}

.mini-card-content {
  flex: 1;
  min-width: 0;
}

.mini-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1F2329;
  margin-bottom: 4px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card-info {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.3;
}

.remove-from-list {
  background: rgba(255, 74, 28, 0.1);
  color: #FF4A1C;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-from-list:hover {
  background: #FF4A1C;
  color: white;
  transform: scale(1.1);
}

.share-panel-actions {
  padding: 16px 20px;
  background: white;
  border-top: 1px solid #E9E2D8;
}

.share-panel-send-btn {
  width: 100%;
  background: linear-gradient(135deg, #FF4A1C 0%, #e63d0f 100%);
  color: white;
  border: none;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(255, 74, 28, 0.3);
}

.share-panel-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 74, 28, 0.4);
}

.share-panel-send-btn:active {
  transform: translateY(0);
}

.chat-input-container {
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  background: white;
}

.example-prompts {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.example-prompts::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.example-prompt {
  background: #E9E2D8;
  border: 1px solid #E9E2D8;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: #1F2329;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.example-prompt:hover {
  background: #FF4A1C;
  color: white;
  border-color: #FF4A1C;
}

/* Start Over floating button - DEPRECATED: replaced by "New Search" button in preset area */
#start-over-btn {
  display: none !important;
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
}

#chatInput {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #FF4A1C;
  border-radius: 24px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  background: white;
  box-shadow: 0 2px 8px rgba(255, 74, 28, 0.15);
}

#chatInput:focus {
  border-color: #FF4A1C;
  box-shadow: 0 4px 12px rgba(255, 74, 28, 0.25);
  transform: translateY(-1px);
}

#sendButton {
  background: #FF4A1C;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#sendButton:hover {
  background: #E63D0F;
  transform: scale(1.05);
}

#sendButton:active {
  transform: scale(0.95);
}

.typing-indicator {
  display: flex;
  gap: 3px;
  padding: 10px 14px;
  background: #f3f4f6;
  border-radius: 12px;
  width: fit-content;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  animation: typing 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 0.9;
  }
}

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .chat-container {
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    max-width: 100%;
    margin-bottom: 0;
  }

  .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 100px;
    min-height: 0;
  }

  .message-content {
    max-width: 85%;
    font-size: 0.9rem;
  }

  .chat-header h1 {
    font-size: 1.3rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .restaurant-card {
    padding: 12px;
  }

  .restaurant-name {
    font-size: 0.9rem;
  }

  .restaurant-info {
    font-size: 0.8rem;
  }

  .map-links {
    flex-direction: column;
  }

  .map-link {
    width: 100%;
    justify-content: center;
    padding: 14px 12px;
    min-height: 44px;
  }
  
  .add-to-list-btn-new {
    padding: 8px 12px;
    font-size: 0.8rem;
    min-height: 44px;
  }

  .delivery-toggle {
    width: 100%;
    text-align: center;
    padding: 14px 12px;
    min-height: 44px;
  }

  .delivery-options {
    flex-direction: column;
  }

  .order-link {
    width: 100%;
    justify-content: center;
    padding: 14px 16px;
    min-height: 44px;
  }

  .summary-toggle {
    width: 100%;
    text-align: center;
    padding: 14px 12px;
    min-height: 44px;
  }

  .share-list-float {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    max-width: none;
    border-radius: 12px 12px 0 0;
    z-index: 1001;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  }
  
  .share-list-float.minimized {
    max-width: 180px;
    left: auto;
    right: 12px;
    bottom: 12px;
    border-radius: 12px;
  }
  
  .share-list-panel.open {
    max-height: 35vh;
    overflow-y: auto;
  }
  
  .share-list-items {
    padding: 10px;
    gap: 6px;
    grid-template-columns: repeat(2, 1fr);
  }
  
  .share-list-mini-card {
    padding: 8px 26px 8px 8px;
  }
  
  .mini-card-name {
    font-size: 0.85rem;
  }
  
  .mini-card-info {
    font-size: 0.75rem;
  }
  
  .share-btn-prominent {
    border-radius: 0;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    background: #FF4A1C;
  }
  
  .share-btn-prominent:hover {
    background: #e63d0f;
  }

  .example-prompts {
    gap: 6px;
    margin-bottom: 10px;
  }

  .example-prompt {
    font-size: 0.8rem;
    padding: 10px 14px;
    min-height: 44px;
  }

  .chat-input-container {
    padding: 12px;
    padding-bottom: 16px;
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 100;
  }

  #chatInput {
    font-size: 0.9rem;
    padding: 12px 16px;
    min-height: 44px;
  }

  #sendButton {
    width: 44px;
    height: 44px;
  }

  footer {
    position: relative;
    z-index: 1;
  }
}

/* Show More Options Button */
.show-more-btn:hover {
  background: #3d444f !important;
}
