.o5 {
  opacity: .5;
}

.o6 {
  opacity: .6;
}

.o7 {
  opacity: .7;
}

.bg-green {
  background-color: #268A58 !important;
}

.bg-lightgreen {
  background-color: #C3EF93 !important;
}

.vh-50 {
  height: 50dvh;
}

.fs-normal {
  font-size: 1rem !important;
}

.fs-l {
  font-size: 48px;
  font-weight: bold;
  /*text-transform: capitalize;*/

  @media (max-width: 768px) {
    font-size: 32px;
  }
}

.text-lightgreen {
  color: #E6FCCE;;
}

.bg-darkgreen {
  background-color: #021E0A;
}

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

.fw-boldest {
  font-weight: 900;
}

body {
  font-family: Satoshi, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
  Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-feature-settings: "ss02", "ss03";
  margin-top: 1.2rem; /* why? */
}

h1, h2, h3, h4, h5, h6 {
  font-family: ButlerPro, serif;
  line-height: 110%;
}

.title-text {
  font-family: Aguero, serif;
}

.text-jumbo {
  font-size: 20vw;
  white-space: nowrap;
  text-overflow: clip;
  margin-top: 0;
}

.subtext {
  margin-top: 0;
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1600px) {
  .text-jumbo {
    font-size: 16vw;
    margin-top: -3rem;
  }
}

@media (min-width: 1440px) {
  .subtext {
    margin-top: -6rem !important;
  }
}

.hidden {
  display: none;
}

.input-group-text-inset {
  background: none;
  border: none;
  padding: 0;
}

.input-group-text-inset .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  resize: vertical; /* Allows resizing vertically */
}

.bottom-content {
  margin: auto auto 0;

  @media (max-width: 768px) {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 1rem;
  }
}

.call-btn {
  background-color: #fff;
  filter: invert();
  width: 64px;
  height: 64px;

  @media (max-width: 768px) {
    width: 48px;
    height: 48px;
  }
}

.prompt-input-container {
  gap: 1rem;
  border-radius: 30px !important;
  border: none;
  background: #f8f8f8;
  min-height: 64px;
  box-shadow: #cacaca 0 0 8px;

  [type="submit"] {
    right: 8px;
    bottom: 8px;
    height: 48px;
    width: 48px;
    border: none;
    padding: 0;
    cursor: pointer;
    color: white;
    background: black;

    &:hover {
      opacity: .7;
    }

    &:disabled {
      color: #a9a9a9;
      background: revert;

      &:hover {
        opacity: 1;
      }
    }

    .icon-streaming {
      display: none;
    }

    &.streaming {
      .icon-enabled {
        display: none;
      }

      .icon-streaming {
        display: revert;
      }
    }
  }

  &.mobile {
    background: #F4F4F1;
    box-shadow: none;
    min-height: 48px;

    textarea {
      background-color: #F4F4F1 !important;
      font-size: 16px;
      overflow-y: hidden;
    }

    [type="submit"] {
      right: 4px;
      bottom: 4px;
      height: 40px;
      width: 40px;
    }
  }

  textarea {
    --bs-bg-opacity: 1;
    background-color: #f8f8f8 !important;
    padding-top: 4px;
    flex-grow: 1;
    border: none;
    min-height: 1em; /* Minimum height to accommodate one sentence */
    max-height: calc(1em * 8); /* Maximum height for five sentences */
    overflow-y: scroll; /* Scroll only after reaching max-height */
    resize: none; /* Disable manual resizing */
    box-sizing: border-box;

    &:focus,
    &:active {
      border: none; /* Ensure no border on focus/active */
      outline: none; /* Ensure no outline on focus/active */
      box-shadow: none; /* Disable any shadow effects */
    }
  }
}

.fs-10x {
  font-size: 10px !important;
}

.fs-12x {
  font-size: 12px !important;
}

.fs-14x {
  font-size: 14px !important;
}

.fs-18x {
  font-size: 18px !important;
}

.fs-20x {
  font-size: 20px !important;
}

.typing-indicator {
  font-size: 16px;
  color: #000;
  display: flex;
  opacity: 0.6;
}

.typing-indicator::before {
  content: 'Ada is typing';
  animation: typingText 16s infinite;
}

.typing-indicator::after {
  content: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDEwIDEwIj48Y2lyY2xlIGN4PSI1IiBjeT0iNSIgcj0iNSIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==');
  animation: typingDots 1s infinite;
  width: 24px;
  text-align: left;
}

@keyframes typingText {
  0%, 33% {
    content: 'Thinking';
  }
  34%, 66% {
    content: 'Taking a little longer than usual';
  }
  67%, 100% {
    content: 'Hold on just a moment';
  }
}

@keyframes typingDots {
  0%, 25% {
    content: '.';
  }
  26%, 50% {
    content: '..';
  }
  51%, 75% {
    content: '...';
  }
  76%, 100% {
    content: '.';
  }
}


.h-text {
  color: #222025;
  font-feature-settings: "ss02" on, "ss01" on;
  font-family: ButlerPro, sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 106%; /* 21.2px */
  letter-spacing: -0.8px;
}

.bg-beige {
  background: #F4F4F1;
}

.conversation {
  margin: auto auto 0;
}

.message {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}

.message-left {
  justify-content: flex-start;

  .message-content {
    @media (max-width: 768px) {
      padding-left: 0;
      padding-right: 1rem;
    }
  }
}

.message-right {
  justify-content: flex-end;
}

.message-content {
  max-width: 70%;
  color: #434343;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  padding: 1.5rem;

  @media (max-width: 768px) {
    max-width: 80%;
    font-size: 14px;
    line-height: 20px;
  }

  table, th, td {
    border: 1px solid;
    text-align: center;
    border-collapse: collapse;
  }

  th, td {
    width: 125px;
  }

  li p {
    margin-bottom: initial;
  }
}

.message-time {
  font-size: 0.8em;
  color: #999;
  margin-top: 5px;
}

.message-right .message-content {
  border-radius: var(--Radius-XL, 38px) var(--Radius-XL, 38px) var(--Kerning-None, 0px) var(--Radius-XL, 38px);
  background: rgba(0, 0, 0, 0.04);
}

/* Define the keyframes for the fade-in and fade-out animations */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

#intro-box {
  /* Invisible class that makes the element disappear immediately */

  &.invisible {
    opacity: 0;
    pointer-events: none; /* Optional: Disable interactions */
    animation: fadeOut 0s forwards; /* Immediate fade-out animation */
  }

  /* Apply the fade-in animation when the invisible class is removed */

  &:not(.invisible) {
    animation: fadeIn 1s forwards; /* Delay for the fade-in animation */
  }
}

.textarea-css {
  padding-top: 2px !important;
  resize: none;
  height: 30px;
}

textarea::-webkit-scrollbar {
  width: 5px; /* Adjust the width of the scrollbar */
}

textarea::-webkit-scrollbar-thumb {
  background: #888; /* Color of the scrollbar thumb */
  border-radius: 10px; /* Roundness of the scrollbar thumb */
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #555; /* Color when hovered */
}


.accordion-button {
  font-size: 14px;
  padding: .5rem 1rem;

  &:not(.collapsed) {
    background-color: #f8f9fa;
    color: initial;
  }
}

.btn-beige {
  background: rgba(0, 0, 0, 0.05);

  &:hover {
    background: rgba(0, 0, 0, 0.15);
  }
}

.btn-epic {
  color: #000;
  font-size: 18px;
  padding: 1rem;

  i {
    font-size: 1rem;
  }

  @media (max-width: 768px) {
    font-size: 14px;

    i {
      font-size: 14px;
    }
  }
}

.prompt-cards-container .card, .conversation-cards-container .card {
  border-radius: 24px;
  background: #fff;
  border: 1px solid #fff;
  box-sizing: border-box;

  a {
    text-decoration: none;
  }

  &:hover {
    cursor: pointer;
    /*border: 1px solid #e3e3e3;*/
  }
}

.prompt-cards-container .card .card-body {
  padding: 1.5rem .5rem .5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  .card-title {
    padding-right: 1rem;
  }
}

.launch-point {
  width: 48px;
  height: 48px;
  background-color: #F4F4F1;
  border-radius: 50rem;

  &::before {
    vertical-align: baseline;
  }

  display: flex;
  justify-content: center;
  align-items: center;
}

.sep {
  opacity: 0.3;
  color: #C2C2BC;
}

.prompt-cards-container, .conversation-cards-container {
  width: 100%;
  overflow: hidden;
}

.prompt-cards-scroll, .conversation-cards-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.prompt-cards-scroll::-webkit-scrollbar, .conversation-cards-scroll::-webkit-scrollbar {
  display: none; /* WebKit */
}

.prompt-cards-container .card {
  flex: 0 0 auto;
  width: 246px;
  height: 100%;
  margin-right: 1rem;
  scroll-snap-align: start;
}

.conversation-cards-container .card {
  .card-img-top {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  border-radius: 16px;
  flex: 0 0 auto;
  width: 228px;
  height: 100%;
  margin-right: 1rem;
  scroll-snap-align: start;
}

.card-title {
  font-size: 18px;
}

#conversationTabs {
  gap: 2rem;

  .nav-item :not(.active) {
    opacity: .3;
  }
}

.loading-indicator {
  border-radius: 24px;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.8);
}

.launch-card {
  &:hover .launch-point {
    background-color: #268A58;

    svg path {
      stroke: white;
    }
  }
}

.launch-card, .discovery-item {
  .loading-indicator {
    visibility: hidden;
  }

  &.htmx-request {
    .loading-indicator {
      visibility: visible;
      cursor: not-allowed;
    }

    .stretched-link::after {
      cursor: not-allowed;
    }
  }
}


#share-box {
  width: 200px;
  height: 200px;
  right: 2rem;
  bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);

  > div {
    gap: .5rem;
  }

  @media (max-width: 768px) {
    h5 {
      font-size: 14px;
    }

    bottom: 84px;
    left: 0;
    width: 100%;
    height: 72px;
    box-shadow: none;
    border-radius: 0 !important;
  }
}

#share-box, .invite-box {
  .header-img {
    background-color: #7EE2A2;
    position: relative;
    overflow: hidden;

    img {
      transition: bottom .1s ease-out;
      left: -50%;
      position: absolute;
      bottom: -12px;
      transform: scale(1.5) translateX(35%);
    }
  }

  &:hover .header-img img {
    bottom: -4px;
  }
}

#share-box .header-img {
  width: 42px;
  height: 42px;
}

.invite-box .header-img {
  width: 80px;
  height: 80px;

  @media (max-width: 768px) {
    width: 64px;
    height: 64px;
  }
}

.scroll-btn {
  height: 48px;
  width: 48px;
  background-color: rgba(0, 0, 0, 0.04);

  i {
    font-size: 18px;
  }
}


.modal-mobile-fullscreen {
  @media (max-width: 768px) {
    width: 100vw;
    max-width: none;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    &.force-fullscreen .modal-content {
      height: 100dvh;
    }

    .modal-content {
      margin-top: auto;
      height: revert;
      border: 0;
      border-bottom-left-radius: 0 !important;
      border-bottom-right-radius: 0 !important;
    }
  }
}

@media (max-width: 768px) {
  .modal.fade {
    transition: opacity 0.1s linear;
  }

  .modal.fade .modal-dialog {
    transition: transform 0.15s ease-out;
    transform: translateY(100vh);
  }

  .modal.show .modal-dialog {
    transform: translateY(0);
  }
}