/* ================================================
   MODULAR CHAT NAVIGATOR STYLES
   ================================================ */

.chat-navigator-component {
  background: var(--bg-light, #f8f9fa);
  border-radius: 16px;
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chat-header {
  text-align: center;
  margin-bottom: 24px;
}

.chat-title {
  font-size: 24px;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.chat-title i {
  color: var(--nycbs-purple, #763d76);
}

.chat-subtitle {
  color: var(--text-secondary, #5a5a5a);
  font-size: 16px;
}

/* Input Section */
.chat-input-wrapper {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  background: white;
  border-radius: 30px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
  border-color: var(--nycbs-purple, #763d76);
  box-shadow: 0 4px 12px rgba(118, 61, 118, 0.15);
}

.chat-input {
  flex: 1;
  border: none;
  padding: 14px 20px;
  font-size: 16px;
  background: transparent;
  outline: none;
  font-family: inherit;
}

.chat-send-btn {
  background: var(--nycbs-purple, #763d76);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-send-btn:hover {
  background: #8b4a8b;
  transform: translateY(-1px);
}

/* Suggestions */
.chat-suggestions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}

.suggestion-pill {
  background: white;
  border: 1px solid rgba(118, 61, 118, 0.2);
  color: var(--nycbs-purple, #763d76);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.suggestion-pill:hover {
  background: var(--nycbs-purple, #763d76);
  color: white;
  transform: translateY(-2px);
}

/* Messages Area */
.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px 0;
  display: none; /* Hidden until first message */
}

.chat-messages.active {
  display: block;
}

/* Message Styles */
.chat-message {
  margin-bottom: 20px;
  animation: fadeIn 0.4s ease;
  max-width:800px;
}

.user-message {
  text-align: right;
}

.user-message .message-bubble {
  background: var(--nycbs-purple, #763d76);
  color: white;
  display: inline-block;
  padding: 12px 20px;
  border-radius: 20px 20px 4px 20px;
  max-width: 70%;
  text-align: left;
}

.assistant-message .message-bubble {
  background: white;
  padding: 16px 20px;
  border-radius: 20px 20px 20px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Response Types */
.response-text {
  color: var(--text-primary, #1a1a1a);
  line-height: 1.6;
  margin-bottom: 16px;
}

.response-text a {
  color: var(--nycbs-blue, #008dd0);
  text-decoration: underline;
}

.response-text a:hover {
  color: var(--nycbs-purple, #763d76);
}

/* Provider List Response */
.provider-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.provider-item {
  background: var(--bg-light, #f8f9fa);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.provider-item:hover {
  background: #e8ecf1;
  transform: translateX(4px);
  text-decoration: none;
}

.provider-info h4 {
  font-size: 16px;
  color: var(--nycbs-purple, #763d76);
  margin-bottom: 4px;
}

.provider-specialty {
  font-size: 14px;
  color: var(--text-secondary, #5a5a5a);
  margin-bottom: 2px;
}

.provider-location {
  font-size: 13px;
  color: var(--text-secondary, #5a5a5a);
}

.provider-arrow {
  color: var(--nycbs-blue, #008dd0);
  font-size: 18px;
}

/* Location List Response */
.location-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.location-item {
  background: var(--bg-light, #f8f9fa);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.location-item:hover {
  background: #e8ecf1;
  transform: translateX(4px);
  text-decoration: none;
}

.location-info h4 {
  font-size: 16px;
  color: var(--nycbs-purple, #763d76);
  margin-bottom: 4px;
}

.location-address {
  font-size: 14px;
  color: var(--text-secondary, #5a5a5a);
  margin-bottom: 2px;
}

.location-services {
  font-size: 12px;
  color: var(--nycbs-blue, #008dd0);
}

/* Loading State */
.chat-loading {
  text-align: center;
  padding: 20px;
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 10px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--nycbs-purple, #763d76);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-text {
  color: var(--text-secondary, #5a5a5a);
  font-size: 14px;
  padding-left:10px;
  font-weight:800;
}

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

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-navigator-component {
    padding: 20px;
    border-radius: 0;
  }

  .chat-title {
    font-size: 20px;
  }

  .chat-subtitle {
    font-size: 14px;
  }

  .chat-input-wrapper {
    flex-direction: column;
    border-radius: 16px;
  }

  .chat-send-btn {
    width: 100%;
    justify-content: center;
  }

  .chat-suggestions {
    gap: 8px;
  }

  .suggestion-pill {
    font-size: 13px;
    padding: 6px 12px;
  }

  .provider-item,
  .location-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .provider-arrow {
    display: none;
  }

  .btn-text {
    display: inline;
  }
}

@media (max-width: 480px) {
  .chat-send-btn .btn-text {
    display: none;
  }

  .chat-send-btn {
    width: auto;
    padding: 14px;
  }

  .chat-input-wrapper {
    flex-direction: row;
  }
}
/* ================================================
   QUICK SEARCH RESULTS STYLES
   ================================================ */

.quick-search-results {
  display: none;
  margin-top: 16px;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 400px;
  overflow-y: auto;
}

.quick-search-results.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

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

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.results-count {
  font-size: 14px;
  color: var(--text-secondary, #5a5a5a);
  font-weight: 500;
}

.clear-chat-results{
    float: right;
    font-size: 14px;
    color: var(--nycbs-purple, #763d76);
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.clear-results {
  font-size: 14px;
  color: var(--nycbs-purple, #763d76);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.clear-results:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Provider Cards in Quick Search */
.provider-result-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-light, #f8f9fa);
  border-radius: 12px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.provider-result-card:hover {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateX(4px);
}

.provider-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.provider-result-info {
  flex: 1;
}

.provider-result-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--nycbs-purple, #763d76);
  margin-bottom: 4px;
}

.provider-result-specialty {
  font-size: 14px;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 4px;
}

.provider-result-location {
  font-size: 13px;
  color: var(--text-secondary, #5a5a5a);
  display: flex;
  align-items: center;
  gap: 6px;
}

.provider-result-location i {
  color: var(--nycbs-blue, #008dd0);
  font-size: 12px;
}

.result-arrow {
  color: var(--nycbs-blue, #008dd0);
  font-size: 18px;
  transition: transform 0.3s ease;
}

.provider-result-card:hover .result-arrow {
  transform: translateX(4px);
}

/* Location Cards in Quick Search */
.location-result-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-light, #f8f9fa);
  border-radius: 12px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.location-result-card:hover {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateX(4px);
}

.location-result-icon {
  width: 56px;
  height: 56px;
  background: rgba(118, 61, 118, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.location-result-icon i {
  font-size: 24px;
  color: var(--nycbs-purple, #763d76);
}

.location-result-info {
  flex: 1;
}

.location-result-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--nycbs-purple, #763d76);
  margin-bottom: 4px;
}

.location-result-address {
  font-size: 14px;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 4px;
}

.location-result-services {
  font-size: 13px;
  color: var(--nycbs-blue, #008dd0);
}

.location-result-card:hover .result-arrow {
  transform: translateX(4px);
}

/* Loading state for input */
.chat-input.searching {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Ccircle cx='10' cy='10' r='8' stroke='%23763d76' stroke-width='2' fill='none' stroke-dasharray='15 10' opacity='0.3'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 10 10' to='360 10 10' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 20px 20px;
}

/* Hide suggestions when quick search is active */
.chat-suggestions {
  transition: opacity 0.3s ease;
}

/* Enhanced Message Area for AI Responses */
.chat-messages.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Smooth transitions between modes */
.chat-navigator-component [id*="search"],
.chat-navigator-component [id*="messages"] {
  transition: all 0.3s ease;
}
