/**
 * @file
 * Smartbox styles for the RRC theme.
 */

.a-page__smartbox {
  --_clr-smartbox: var(--clr-black);
  --_margin-block-start-smartbox: 5em;
  display: grid;
  margin-block-start: var(--_margin-block-start-smartbox);
  margin-inline: var(--h-spacer);
  padding-block: .25em;
  color: var(--_clr-smartbox);
  border-block-end: 1px solid currentColor;
  transform: translateY(-3em);
  @media (min-width: 900px) {
    grid-template-columns: calc(50% + 1em) auto;
  }
}

.path-frontpage .a-page__smartbox {
  --_clr-smartbox: var(--clr-white);
  --_margin-block-start-smartbox: 0;
  transform: translateY(-7.5em);
  transition: all 500ms ease-in-out;
}

.path-frontpage .a-page__smartbox:has(.a-prompt__input:focus),
.path-frontpage .a-page__smartbox:has(.a-prompt__message--user) {
  --_clr-smartbox: var(--clr-black);
  transform: translateY(0);
}

.a-page__anchor {
  margin-block-start: 1em;
}

.a-prompt {
  display: grid;
  grid-template-columns: auto 2em;
  align-self: end;
}

.a-prompt__box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-height: 50svh;
  overflow: hidden;
  min-height: 6em;
}

.a-prompt__placeholder {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  pointer-events: none;
  z-index: 100;
}

.a-prompt__input {
  outline: none;
  word-break: break-word;
  min-width: 50ch;
  border: 0;
  background-color: transparent;
  color: currentColor;
  &:focus {
    outline: none;
    border: none;
  }
}

.a-prompt__submit {
  color: currentColor;
  border: none;
  background-color: transparent;
  width: 2em;
  align-self: end;
}

.a-prompt__conversation {
  display: flex;
  flex-direction: column;
  gap: .75em;
  overflow-y: auto;
  padding-block-end: 1em;
  /* Scrollbar schovaný ale funkční */
  scrollbar-width: none;
}

.a-prompt__conversation::-webkit-scrollbar {
  display: none;
}

.a-prompt__message {
  line-height: 1.4;
  word-break: break-word;
}

.a-prompt__message--user {
  color: var(--clr-black);
}

.a-prompt__message--ai {
  color: var(--clr-blue);
  a {
    text-decoration: underline;
    text-decoration-style: dotted;
  }
}

.a-prompt__message--error {
  color: var(--clr-black);
  opacity: .5;
}

.a-smartbox__collection-link {
  display: none;
  color: currentColor;
  justify-self: end;
}

.a-smartbox__last-article {
  display: none;
  text-align: center;
  align-self: end;
  @media (min-width: 900px) {
    display: block;
  }
  a {
    color: currentColor;
  }
  .views-field-body {
    text-align: left;
    p {
      margin-block: 1em 0;
    }
  }
}

.a-smartbox__video-toggle {
  display: none;
  color: currentColor;
  border: none;
  background-color: transparent;
}

.a-smartbox__video-toggle--paused {
  color: currentColor;
}


