/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Demo Page Styles */
.demo-container {
  background: #ffffff;
  color: #000000;
  min-height: calc(100vh - 160px); /* Account for header/footer */
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.demo-main-container {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-sizing: border-box;
}

.demo-chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 1.25em;
  background: #f8f8f8;
}

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

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

.demo-message-group.user {
  flex-direction: row-reverse;
}

.demo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.demo-avatar.demo-ai {
  background: #000000;
  color: #ffffff;
}

.demo-avatar.demo-user {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
}

.demo-message-content {
  max-width: 70%;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.demo-message-group.user .demo-message-content {
  background: #000000;
  color: #ffffff;
}

.demo-message-text {
  font-size: 15px;
  line-height: 1.5;
  color: #000000;
}

.demo-message-group.user .demo-message-text {
  color: #ffffff;
}

.demo-quick-form {
  background: #ffffff;
  border-radius: 1em;
  padding: 1.25em;
  margin: 1em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.demo-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1em;
  margin-bottom: 1em;
}

.demo-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-form-label {
  font-size: 12px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.demo-form-input {
  padding: 10px 12px;
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  color: #000000;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.demo-form-input:focus {
  border-color: #000000;
  background: #ffffff;
}

.demo-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.demo-purpose-chips {
  display: flex;
  gap: 8px;
  flex: 1;
}

.demo-chip {
  padding: 8px 16px;
  background: #e0e0e0;
  border: 2px solid transparent;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  color: #000000;
  font-weight: 500;
}

.demo-chip.active {
  background: #000000;
  color: #ffffff;
}

.demo-chip:hover:not(.active) {
  background: #d0d0d0;
}

.demo-submit-btn {
  padding: 10px 20px;
  background: #000000;
  border: none;
  border-radius: 20px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.demo-suggested-actions {
  padding: 1em;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.demo-suggestions-container {
  display: flex;
  gap: 0.5em;
  overflow-x: auto;
  padding-bottom: 0.5em;
  -webkit-overflow-scrolling: touch;
}

.demo-suggestion {
  padding: 0.625em 1em;
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  border-radius: 1.25em;
  font-size: 0.813em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  color: #000000;
  font-weight: 500;
  flex-shrink: 0;
}

.demo-suggestion:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.demo-input-container {
  padding: 1.25em 1em;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  position: sticky;
  bottom: 0;
  z-index: 100;
}

.demo-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  padding: 4px 4px 4px 16px;
  transition: all 0.2s;
}

.demo-input-wrapper:focus-within {
  border-color: #000000;
  background: #ffffff;
}

.demo-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #000000;
  font-size: 14px;
  outline: none;
  padding: 8px 0;
}

.demo-chat-input::placeholder {
  color: #999999;
}

.demo-send-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000000;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.demo-send-button:hover {
  transform: scale(1.1);
}

.demo-premium-banner {
  margin: 1em;
  background: #000000;
  color: #ffffff;
  border-radius: 1em;
  padding: 1.25em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
}

.demo-premium-content {
  flex: 1;
}

.demo-premium-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ffffff;
}

.demo-premium-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

.demo-premium-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-premium-price {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
}

.demo-premium-btn {
  padding: 10px 20px;
  background: #ffffff;
  border: none;
  border-radius: 20px;
  color: #000000;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-premium-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Scrollbar styling for demo */
.demo-chat-container::-webkit-scrollbar {
  width: 6px;
}

.demo-chat-container::-webkit-scrollbar-track {
  background: #f8f8f8;
}

.demo-chat-container::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 3px;
}

.demo-chat-container::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

@media (max-width: 768px) {
  .demo-chat-container {
    padding: 1em;
    gap: 1em;
  }

  .demo-message-content {
    max-width: 85%;
    padding: 0.875em;
  }

  .demo-quick-form {
    margin: 0.75em;
    padding: 1em;
  }

  .demo-form-actions {
    flex-direction: column;
    gap: 1em;
  }

  .demo-purpose-chips {
    width: 100%;
    justify-content: space-between;
  }

  .demo-submit-btn {
    width: 100%;
  }

  .demo-premium-banner {
    margin: 0.75em;
    padding: 1em;
    text-align: center;
  }

  .demo-premium-cta {
    width: 100%;
    justify-content: center;
  }

  .demo-premium-btn {
    flex: 1;
  }

  .demo-suggested-actions {
    padding: 0.75em;
  }

  .demo-input-container {
    padding: 1em 0.75em;
  }

  .demo-input-wrapper {
    padding: 0.25em 0.25em 0.25em 1em;
  }

  /* Hide scrollbar on mobile for suggestions */
  .demo-suggestions-container::-webkit-scrollbar {
    display: none;
  }
}
