.chat-container {
  padding: 18px 12px 12px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(252, 244, 248, 0.9) 52%, rgba(245, 252, 248, 0.86) 100%),
    url("../img/background.png") center center / cover no-repeat;
  border: 1px solid rgba(217, 90, 155, 0.2);
  border-radius: 0.9rem;
}

.chat-page-title {
  padding-top: 6px;
  margin-bottom: 20px;
}

.chat {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.8rem;
  max-width: 640px;
  margin: 20px auto;
  background-color: #fff;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e8e8e9;
}

.chat-notify {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-notify .notify-title {
  font-weight: 500;
  font-size: 18px;
}
.chat-notify .notify-badge {
  background-color: #ecf9f3;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.08);
  color: #4ec69a;
  display: block;
  padding: 0 10px;
  font-weight: 400;
  font-size: 14px;
  border-radius: 4px;
}

.chat-body {
  padding: 20px;
  height: 450px;
  overflow-y: scroll;
}

.chat-footer {
  width: 100%;
  border-top: 1px solid rgb(232, 232, 233);
  padding: 20px;
}

.chat-ask {
  display: none;
}
.chat-ask.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}
.chat-ask.active > :not(.input) {
  display: flex;
  justify-content: flex-end;
}

@media screen and (max-width: 600px) {
  .chat-ask.active {
    grid-template-columns: 1fr;
  }
  .chat-ask.active > :not(.input) {
    justify-content: flex-start;
  }
}
.chat-message {
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
}
.chat-message:last-of-type {
  margin-bottom: 0;
}
.chat-message.bubble-left {
  gap: 15px;
}
.chat-message.bubble-left .chat-message-bubble {
  background-color: #f7f7f7;
  color: #4a5158;
}
.chat-message.bubble-right {
  justify-content: end;
  text-align: right;
}
.chat-message.bubble-right .chat-message-bubble {
  background-color: rgba(20, 25, 30, 0.1);
  color: #4a5158;
}

.chat-message-avatar {
  max-width: 40px;
  max-height: 40px;
  width: 100%;
  height: 100%;
}
.chat-message-avatar img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 50%;
}

.chat-message-bubble {
  max-width: 380px;
  padding: 10px 20px;
  border-radius: 4px;
  margin: 0;
  font-size: 16px;
}

.chat-message-time {
  font-size: 14px;
  color: #262626;
  font-weight: 400;
  display: block;
  margin: 5px;
}

.bubble-writing {
  display: flex;
}
.bubble-writing .chat-message-bubble {
  background-color: #f1f1f1 !important;
  width: 50px;
  height: 30px
}

.writing-loader {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 2px auto;
  background-color: #fff;
  box-shadow: -12px 0 #fff, 12px 0 #fff;
  animation: writing-loader 2s linear infinite;
}

@keyframes writing-loader {
  33% {
    background-color: #fff;
    box-shadow: -12px 0 #7d8084, 12px 0 #fff;
  }
  67% {
    background-color: #7d8084;
    box-shadow: -12px 0 #fff, 12px 0 #fff;
  }
  100% {
    background-color: #fff;
    box-shadow: -12px 0 #fff, 12px 0 #7d8084;
  }
}
.icon-btn {
  color: #fff;
  background-color: #ffd1d1;
  border-color: #fff;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}
.icon-btn:hover {
  color: #fff;
  background-color: #ffdbdb;
}

.chat-btn {
  border: 1px solid #9dd7af;
  color: #fff;
  background-color: #a4dab5;
  font-size: 16px;
  font-weight: 600;
  width: 92px;
  height: 42px;
  border-radius: 4px;
  transition: 0.2s ease-in-out;
}
.chat-btn:hover:not(:disabled) {
  cursor: pointer;
  background-color: #92d3a6;
  border: 1px solid #abddbb;
}
.chat-btn.chat-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 260px;
  height: 44px;
  padding: 0 22px;
  text-decoration: none;
}
.chat-btn.chat-btn-primary:link,
.chat-btn.chat-btn-primary:visited,
.chat-btn.chat-btn-primary:focus {
  color: #fff;
  text-decoration: none;
}
.chat-btn.chat-btn-primary:hover {
  color: #fff;
  background-color: #92d3a6;
  border: 1px solid #abddbb;
  text-decoration: none;
}

@media screen and (max-width: 600px) {
  .chat-btn {
    width: 100%;
    height: 36px;
    font-size: 14px;
  }
  .chat-btn.chat-btn-primary {
    min-width: 0;
    width: 100%;
  }
}
.game .input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 400;
  color: #262626;
  overflow: hidden;
  border: 1px solid #e1e4e6;
  border-radius: 4px;
}

.input-text {
  display: flex;
  align-items: center;
  gap: 10px;
}
.input-text:not(.input-text--numbers) input {
  width: 100%;
  border-color: transparent;
  border-bottom-color: #ccc;
}
.input-text:not(.input-text--numbers) input:focus {
  border-bottom-color: #ccc;
  outline: 0;
  box-shadow: none;
}

.input-radio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}
.input-radio .radio-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #e1e4e6;
  border-radius: 6px;
  background-color: #fff;
}
.input-radio .radio-item label {
  margin: 0;
  line-height: 1.25;
  cursor: pointer;
}

#ask-sex .input-radio {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#ask-cards .input-radio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#ask-next-action .input-radio .radio-item:last-child {
  grid-column: 1 / -1;
}

.input-text--numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
}
.input-text--numbers .numbers-prefix {
  margin: 0;
  white-space: nowrap;
}
.input-text--numbers .numbers-value {
  width: 56px;
  min-width: 56px;
  padding: 6px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
}
.input-text--numbers .numbers-separator,
.input-text--numbers .numbers-and {
  color: #4a5158;
}

.input-textarea {
  display: block;
  width: 100%;
  height: 44px;
  transition: border-color 0.15s ease-in-out;
}
.input-textarea:not(:disabled) {
  height: 64px;
}
.input-textarea:focus {
  border-color: #ccc;
  outline: 0;
  box-shadow: none;
}
.input-textarea::placeholder {
  color: #a1a1a8;
  font-weight: 300;
  font-size: 16px;
}

@media screen and (max-width: 600px) {
  #ask-sex .input-radio,
  #ask-cards .input-radio {
    grid-template-columns: 1fr;
  }
  #ask-next-action .input-radio .radio-item:last-child {
    grid-column: auto;
  }
  .input-text--numbers .numbers-prefix {
    flex-basis: 100%;
  }
}

.ending-after {
  display: none;
  max-width: 640px;
  margin: 20px auto 0;
}
.ending-after.show {
  display: block;
}
.ending-cta {
  background-color: #f3fbf6;
  border: 1px solid #d5ecdd;
  border-radius: 4px;
  padding: 24px;
  text-align: center;
}
.ending-cta-title {
  margin: 0 0 8px;
  color: #3b8d66;
  font-size: 18px;
  font-weight: 600;
}
.ending-cta-text {
  margin: 0 0 16px;
  color: #4a5158;
  font-size: 14px;
}
.ending-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ending-cta-retry {
  display: inline;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  color: #3b8d66;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 14px;
  cursor: pointer;
}
.ending-cta-retry:hover {
  color: #2f7454;
}
