/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: MIT-0
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this
 * software and associated documentation files (the "Software"), to deal in the Software
 * without restriction, including without limitation the rights to use, copy, modify,
 * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

@keyframes beam {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(50%);
  }
}

.animate-beam {
  animation: beam 5s infinite;
}

/* Basic markdown text styles */
.message-text {
  line-height: 1.5;
}

.message-text p {
  margin-bottom: 1rem;
}

/* Code blocks */
.message-text pre {
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  padding: 1rem;
  margin: 0.5rem 0;
  overflow-x: auto;
}

.message-text code {
  background-color: #f1f1f1;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.875em;
}

/* Lists */
.message-text ul,
.message-text ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.message-text ul {
  list-style-type: disc;
}

.message-text ol {
  list-style-type: decimal;
}

/* Links */
.message-text a {
  color: #3b82f6;
  text-decoration: underline;
}

.message-text a:hover {
  text-decoration: none;
}

/* Blockquotes */
.message-text blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 0.5rem 0;
  color: #4b5563;
}

/* Tables */
.message-text table {
  border-collapse: collapse;
  margin: 0.5rem 0;
  width: 100%;
}

.message-text th,
.message-text td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  text-align: left;
}

.message-text th {
  background-color: #f8f9fa;
}

/* Headings */
.message-text h1 {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0.5rem 0;
}

.message-text h2 {
  font-size: 1.25em;
  font-weight: bold;
  margin: 0.5rem 0;
}

.message-text h3 {
  font-size: 1.125em;
  font-weight: bold;
  margin: 0.5rem 0;
}

/* Horizontal rules */
.message-text hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 1rem 0;
}
