button[disabled]:hover {
  cursor: not-allowed;
}

.main-container {
  border: 1px solid #e6e7eb;
  border-radius: 0.5rem;
}

/**
 * Textareas
 */

textarea {
  flex-grow: 1;
  width: 100%;
  resize: none;
  padding: 0.5rem;
}

.prompt-textarea {
  color: inherit;
  height: auto;
  resize: none;
  max-height: 5.25rem;
}

/**
 * Result
 */

.result-textarea-container {
  display: flex;
  width: 100%;
  flex-grow: 1;
  flex-direction: column;
}

.result-textarea {
  background-color: #F5F7F9;
  outline: none;
  border: none;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  resize: none;
  width: 100%;
  min-height: 100px;
  height: 30rem;
  padding: 1.5rem;
}

.result-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 30rem;
  background-color: #F5F7F9;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

@media screen and (max-width: 991px) {
  .result-container {
    width: 100%;
  }
}

.textareas > div {
  flex: 1 1 0;
}

.textarea-container textarea {
  resize: none;
  background: none;
  position: relative;
}

.textarea-container.result textarea {
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
}

.textarea-container textarea,
.textarea-container textarea:focus,
.textarea-container textarea:focus-visible,
.textarea-container textarea:active {
  border: none;
  outline: none;
}

.textarea-container.result textarea,
.textarea-container.result textarea:disabled,
.textarea-container.result textarea:focus {
  background-color: #F5F7F9;
}

.top-right-btn {
  position: absolute;
  top: 0;
  right: 0;
  margin: 1.5rem 1.5rem 0 0;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-right-btn svg {
  opacity: 0.8;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.top-right-btn:hover svg {
  opacity: 1;
}

.top-right-btn.hide {
  opacity: 0;
  pointer-events: none;
}

/**
 * Skeleton loaders
 */

@keyframes skeleton-loader-fade {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }

  50% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

.result-skeleton {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem;
}

.result-skeleton-line {
  background: #CED4DA;
  height: 1rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
}

.result-skeleton-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, transparent 0%, #e6e7eb 50%, transparent 100%);
  animation: skeleton-loader-fade 1.5s linear infinite;
}

.result-skeleton-line:nth-child(1) {
  width: 5rem;
}

.result-skeleton-line:nth-child(2) {
  width: 5rem;
  margin-bottom: 1.5rem;
}

.result-skeleton-line:nth-child(3) {
  width: 15rem;
  margin-bottom: 1.5rem;
}

.result-skeleton-line:nth-child(4) {
  width: 30rem;
}

.result-skeleton-line:nth-child(5) {
  width: 30rem;
  margin-bottom: 1.5rem;
}

.result-skeleton-line:nth-child(6) {
  width: 30rem;
}

.result-skeleton-line:nth-child(7) {
  width: 30rem;
  margin-bottom: 1.5rem;
}

.result-skeleton-line:nth-child(8) {
  width: 15rem;
  margin-bottom: 1.5rem;
}

.result-skeleton-line:nth-child(9) {
  width: 10rem;
}


/**
 * Result sub-container
 */

.result-sub-container {
  display: flex;
  flex-grow: 1;
  position: relative;
}

/**
 * Error
 */

.result-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  width: 100%;
  height: 100%;
}

.result-error span {
  text-align: center;
  color: #6C757D;
}

.result-error .retry-btn {
  background: white;
  color: #000000A1;
  border: 1px solid #D4D9DF;
  padding: 0.4rem 0.75rem;
}

.result-error .retry-btn:hover {
  color: #000000;
}

/**
 * Examples
 */

.examples-container {
  margin-left: 1.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
}
