/* Travel AI Assistant - Full Page Chat Styles */

.travel-ai-chat-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.chat-page-header {
  background: linear-gradient(135deg, #007C7A 0%, #006663 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-description {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.95;
  font-weight: 300;
}

.chat-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  min-height: calc(100vh - 200px);
}

.chat-interface {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 600px;
}

.chat-messages {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: #fafbfc;
  min-height: 400px;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f1f3f4;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #c1c8cd;
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a8b2ba;
}

.chat-message {
  margin-bottom: 20px;
  display: flex;
  animation: messageSlideIn 0.3s ease-out;
}

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

.chat-message.user-message {
  justify-content: flex-end;
}

.chat-message.assistant-message {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 70%;
  padding: 16px 20px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
  position: relative;
}

.user-message .message-bubble {
  background: linear-gradient(135deg, #007C7A 0%, #006663 100%);
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 124, 122, 0.3);
}

.assistant-message .message-bubble {
  background: white;
  color: #333;
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e8eaed;
}

.assistant-message .message-bubble::before {
  content: '🌴';
  position: absolute;
  left: -35px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  background: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-bubble p {
  margin: 0 0 10px 0;
}

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

.message-bubble strong {
  font-weight: 600;
  color: #00504F;
}

.message-bubble ul,
.message-bubble ol {
  margin: 10px 0;
  padding-left: 20px;
}

.message-bubble li {
  margin-bottom: 5px;
}

.typing-indicator {
  padding: 16px 20px;
  background: white;
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  display: inline-block;
  font-style: italic;
  color: #666;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e8eaed;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.typing-indicator::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% {
    color: transparent;
    text-shadow: 0.25em 0 0 transparent, 0.5em 0 0 transparent;
  }
  40% {
    color: #666;
    text-shadow: 0.25em 0 0 transparent, 0.5em 0 0 transparent;
  }
  60% {
    text-shadow: 0.25em 0 0 #666, 0.5em 0 0 transparent;
  }
  80%, 100% {
    text-shadow: 0.25em 0 0 #666, 0.5em 0 0 #666;
  }
}

.rate-limit-warning {
  margin: 20px 30px;
  background: #FFF5E6;
  border: 1px solid #FFD899;
  border-radius: 8px;
  padding: 15px 20px;
  animation: slideDown 0.3s ease-out;
}

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

.rate-limit-notice {
  color: #B8860B;
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.rate-limit-notice strong {
  color: #9A7806;
  font-weight: 600;
}

.chat-input-section {
  background: white;
  padding: 25px 30px;
  border-top: 1px solid #e8eaed;
}

.input-wrapper {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e8eaed;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  background: #fafbfc;
  font-family: inherit;
}

.chat-input:focus {
  border-color: #007C7A;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 124, 122, 0.1);
}

.chat-input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.button-container {
  display: flex;
  gap: 10px;
}

.send-button,
.end-chat-button {
  padding: 15px 25px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.send-button {
  background: linear-gradient(135deg, #007C7A 0%, #006663 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 124, 122, 0.3);
}

.send-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 124, 122, 0.4);
}

.send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.end-chat-button {
  background: linear-gradient(135deg, #DC3545 0%, #C82333 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.end-chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.chat-sidebar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 30px;
  height: fit-content;
  position: sticky;
  top: 30px;
}

.sidebar-content h3 {
  color: #00504F;
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.help-topics {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.help-topics li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
  line-height: 1.4;
  color: #495057;
}

.help-topics li:last-child {
  border-bottom: none;
}

.contact-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #007C7A;
}

.contact-info h4 {
  color: #00504F;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-info p {
  margin: 0 0 15px 0;
  color: #666;
  font-size: 14px;
}

.contact-details {
  font-size: 14px;
  line-height: 1.5;
}

.contact-details a {
  color: #007C7A;
  text-decoration: none;
  font-weight: 500;
}

.contact-details a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  
  .page-description {
    font-size: 1rem;
  }
  
  .chat-page-header {
    padding: 30px 15px;
  }
  
  .chat-page-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
    margin: 0;
    max-width: 100%;
  }
  
  .chat-sidebar {
    order: -1;
    position: static;
    padding: 20px;
  }
  
  .chat-interface {
    min-height: 70vh;
    max-height: 80vh;
    border-radius: 8px;
    margin: 0;
  }
  
  .chat-messages {
    padding: 15px;
    min-height: 50vh;
    max-height: 60vh;
  }
  
  .message-bubble {
    max-width: 90%;
    font-size: 14px;
    padding: 12px 16px;
    margin: 0 5px 15px 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }
  
  .chat-message {
    margin-bottom: 15px;
    padding: 0 5px;
    box-sizing: border-box;
  }
  
  .chat-message.user-message {
    padding-right: 10px;
  }
  
  .chat-message.assistant-message {
    padding-left: 40px;
  }
  
  .assistant-message .message-bubble::before {
    content: '🌴';
    left: -35px;
    width: 28px;
    height: 28px;
    font-size: 18px;
    top: 8px;
    transform: none;
  }
  
  .chat-input-section {
    padding: 15px;
    background: white;
    border-top: 1px solid #e8eaed;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .chat-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8eaed;
    border-radius: 25px;
    font-size: 16px;
    box-sizing: border-box;
    min-height: 50px;
    resize: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  }
  
  .chat-input:focus {
    border-color: #007C7A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 122, 0.1);
  }
  
  .button-container {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .send-button,
  .end-chat-button {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
  }
  
  .send-button {
    background: linear-gradient(135deg, #007C7A 0%, #006663 100%);
    color: white;
  }
  
  .end-chat-button {
    background: linear-gradient(135deg, #DC3545 0%, #C82333 100%);
    color: white;
  }
  
  .rate-limit-warning {
    margin: 15px;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
  }
  
  .typing-indicator {
    margin: 0 10px 15px 40px;
    padding: 12px 16px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .chat-page-header {
    padding: 25px 10px;
  }
  
  .page-title {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .page-description {
    font-size: 0.95rem;
  }
  
  .chat-page-container {
    padding: 10px;
  }
  
  .chat-interface {
    min-height: 75vh;
    max-height: 80vh;
    border-radius: 6px;
  }
  
  .chat-messages {
    padding: 12px;
    min-height: 55vh;
    max-height: 65vh;
  }
  
  .message-bubble {
    font-size: 13px;
    padding: 10px 14px;
    margin: 0 3px 12px 3px;
    max-width: 92%;
    line-height: 1.4;
  }
  
  .chat-message {
    margin-bottom: 12px;
    padding: 0 3px;
  }
  
  .chat-message.assistant-message {
    padding-left: 35px;
  }
  
  .assistant-message .message-bubble::before {
    content: '🌴';
    left: -32px;
    width: 24px;
    height: 24px;
    font-size: 16px;
    top: 6px;
  }
  
  .chat-input-section {
    padding: 12px;
  }
  
  .input-wrapper {
    gap: 10px;
  }
  
  .chat-input {
    padding: 12px 16px;
    font-size: 16px;
    min-height: 48px;
    border-radius: 24px;
  }
  
  .send-button,
  .end-chat-button {
    padding: 12px 16px;
    font-size: 15px;
    min-height: 48px;
    border-radius: 24px;
  }
  
  .sidebar-content {
    text-align: center;
    padding: 15px;
  }
  
  .help-topics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
  }
  
  .help-topics li {
    padding: 8px 5px;
    font-size: 12px;
    text-align: left;
  }
  
  .contact-info {
    padding: 15px;
    margin-top: 15px;
  }
  
  .contact-info h4 {
    font-size: 1rem;
  }
  
  .contact-info p {
    font-size: 13px;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .chat-page-container {
    padding: 8px;
  }
  
  .chat-interface {
    min-height: 78vh;
  }
  
  .chat-messages {
    padding: 10px;
  }
  
  .message-bubble {
    font-size: 12px;
    padding: 8px 12px;
    margin: 0 2px 10px 2px;
    max-width: 94%;
  }
  
  .chat-message.assistant-message {
    padding-left: 30px;
  }
  
  .assistant-message .message-bubble::before {
    content: '🌴';
    left: -28px;
    width: 22px;
    height: 22px;
    font-size: 14px;
    top: 4px;
  }
  
  .chat-input-section {
    padding: 10px;
  }
  
  .chat-input {
    padding: 10px 14px;
    font-size: 15px;
    min-height: 44px;
  }
  
  .send-button,
  .end-chat-button {
    padding: 10px 14px;
    font-size: 14px;
    min-height: 44px;
  }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
  .chat-page-header {
    padding: 15px;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .page-description {
    font-size: 0.9rem;
  }
  
  .chat-interface {
    min-height: 60vh;
    max-height: 70vh;
  }
  
  .chat-messages {
    min-height: 45vh;
    max-height: 55vh;
    padding: 10px;
  }
  
  .chat-input-section {
    padding: 10px;
  }
  
  .chat-input {
    padding: 10px 16px;
    min-height: 40px;
  }
  
  .send-button,
  .end-chat-button {
    padding: 10px 16px;
    min-height: 40px;
    font-size: 14px;
  }
  
  .assistant-message .message-bubble::before {
    content: '🌴';
  }
}

/* High contrast accessibility */
@media (prefers-contrast: high) {
  .rate-limit-warning {
    background: #fff;
    border: 2px solid #B8860B;
  }
  
  .rate-limit-notice {
    color: #000;
  }
  
  .rate-limit-notice strong {
    color: #B8860B;
  }
}
