.bg {
  background: url('/sites/default/files/media-icons/bg-rr2.webp') no-repeat center center fixed;
  background-size: cover;
  position: fixed;
  top: 0;
  left: -0.8rem;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* ===  === */
.chat-form-query {
  border: 2px solid transparent;
  animation: floatBorder 4s infinite ease-in-out;
  background: linear-gradient(45deg, #1a1a2e, #16213e);
  color: #fff;
  padding: 10px;
  font-size: 16px;
}

@keyframes floatBorder {
  0% { border-image: linear-gradient(45deg, #4a90e2, #50e3c2) 1; }
  50% { border-image: linear-gradient(45deg, #50e3c2, #4a90e2) 1; }
  100% { border-image: linear-gradient(45deg, #4a90e2, #50e3c2) 1; }
}

/* Variant with video background

.container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl {
    padding-right: 0px;
}

*/
.chat-form-query.video-bg {
  background: url('data:image/gif;base64,R0lGODlhAQABAIAA...') no-repeat center center fixed; /* Replace with lightweight video base64 */
  background-size: cover;
  border-image: linear-gradient(45deg, #e0aaff, #00d4ff) 1;
  animation: floatBorder 6s infinite ease-in-out;
}

#live-chat {
	position: relative;
	left: 0vw;
	top: 0vh;
	width: 100vw;
	height: 100vh;
	overflow-y: scroll;
	overflow-x: hidden;
	font-size: 18px;
	z-index: 100;
}


.chat {
  position: relative;
  z-index: 120;
}

.chat-history {
  padding-bottom: 1rem;
}

.chat-message-message {
    backdrop-filter: blur(10px);
    background-color: rgba(30, 41, 59, 0.7);
    width: 90%;
    max-width: 94%;
    margin: 6px auto;
    padding: 5px 5px 5px 35px;
    color: blanchedalmond;
    border-radius: 8px;
}

/* ===  === */
.input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -20px 10px 10px 10px;
}

.button-container {
	display: flex;
	gap: 0px;
	margin-left: 0px;
	flex-wrap: wrap;
	z-index: 1000;
}
.button-container2 {
  display: flex;
  gap: 0px;
  margin-left: 0px;
}
.r-button.rune.flipped .rune-text {
  color: red;
}

@media (min-width: 640px) {
.upkey {
	display: none !important;
}
}
#edit-query {
	--bubble-radius: 200px;
	width: 200px;
	height: 200px !important;
	border-radius: 50%;
	box-shadow: calc((var(--bubble-radius) / 25) * -1) calc(var(--bubble-radius) / 18) 8px 0 rgba(0,0,0,0.8), inset calc((var(--bubble-radius) / 5) * -1) calc((var(--bubble-radius) / 5)) calc((var(--bubble-radius) / 4)) 0 rgba(0,0,0,0.7);
	background: none;
	border: none;
	resize: none;
	padding: 28px;
	color: #fff;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 24px;
	font-weight: 800;
	outline: none;
	flex-wrap: wrap;
	line-height: 1;
}

#edit-query::after {
  content: " ";
  background: #fff;
  width: 15%;
  height: 15%;
  border-radius: 50%;
  transform: skew(11deg, 2deg);
  position: absolute;
  top: 20%;
  left: 63%;
  z-index: 10;
  opacity: 0.9;
}

#edit-query::before {
  content: " ";
  background-color: #fff;
  width: 9%;
  height: 9%;
  border-radius: 50%;
  transform: skew(10deg, 0deg);
  position: absolute;
  top: 40%;
  left: 75%;
  z-index: 20;
  opacity: 0.4;
}

.r-button {
  position: absolute;
  width: 45px;
  height: 65px;
  font-size: 36px;
  color: #fff;
  border: 1px solid #333;
  border-radius: 50%;
  background-color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.5);
}

.r-button.action {
	position: static;
	margin: 5px;
	width: auto;
	height: auto;
	color: #ea9a5f;
	font-size: 22px;
	padding: 5px 10px;
	border-radius: 38px;
	transform: none;
	font-family: 'Norse-Bold', 'Arial', sans-serif;
	box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.5);
}
.r-button.clear {
	position: static;
	margin: 5px;
	width: auto;
	height: auto;
	font-size: 16px;
	padding: 5px 10px;
	border-radius: 6px;
	transform: none;
}

.r-button.flipped {
  transform: rotate(180deg) translate(-50%, -50%);
  color: red;
}
.r-button.r-key.clear.clear-history {
	width: auto;
	height: 40px;
	padding: 5px 7px;
	color: white;
	border-radius: 6px;
	background-color: #1e293b;
	font-size: 17px;
	cursor: pointer;
}
.r-button.r-key.clear.clear-history:hover {
  opacity: 0.8;
}
.r-button.r-key.clear.clear-history:active {
  border: none;
  background-color: #c21f1f;
}

.rune-text {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.rune-text.visible {
  opacity: 1;
}

.runer {
  max-width: 100%;
  margin: auto;
}

.runic-keys {
	position: relative;
	display: block;
	width: 85vw;
	min-height: 45vh;
	height: auto;
	margin: -60px auto 10px auto;
	background-color: transparent;
	overflow: visible;
	z-index: 200;
}

.runer-line {
  display: grid;
  justify-items: center;
  justify-content: space-around;
}

@media (min-width: 640px) {
  .chat-message-content {
    margin-left: 56px;
  }
}

textarea.chat-form-query::placeholder {
  color: blanchedalmond !important;
  font-size: 18px !important;
  animation: blink 1s infinite !important;
  opacity: 1 !important;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


textarea.chat-form-query {
  width: 100%;
 
}
 /*# # */



/* Chat block CSS */  /*## */
.block-ai-chat-form,
.block-ai-chat-form.contextual-region {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  overflow: scroll;
  width: 100%;
  margin-bottom: 0 !important;
  resize: both;
  background-color: white;
  box-shadow: 4px 4px 10px rgba(150, 150, 150, 0.5);
}

@media (min-width: 720px) {
  .block-ai-chat-form,
  .block-ai-chat-form.contextual-region {
    right: 1rem;
    bottom: 1rem;
    width: 40%;
    border-radius: 12px;
  }
}

/* Block heading */
.block-ai-chat-form h2 {
  padding: 1rem;
  color: white;
  background-color: var(--color--primary-40);
}

@media (min-width: 720px) {
  .block-ai-chat-form h2 {
    border-radius: 12px 12px 0 0;
  }
}

/* Form layout */
.block-ai-chat-form form {
  display: grid;
  grid-template-columns: 1fr auto;
}

/* Query field */
.block-ai-chat-form .chat-form-query {
  width: calc(100% - 1rem);
  min-height: auto;
  margin: 0 1rem;
  resize: none;
}

/* Response field */
.block-ai-chat-form .chat-form-response {
  overflow: scroll;
  grid-column-start: span 2;
  max-height: 200px;
  padding: 0.5rem 1rem;
}

/* Force scrollbar to always show in response field */
.block-ai-chat-form .chat-form-response::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 7px;
}
.block-ai-chat-form .chat-form-response::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Submit button. */
.block-ai-chat-form .chat-form-send {
  height: 75%;
  padding-top: 0;
  border: 1px 1px 1px 0 solid var(--color--gray-60);
}

/* Live chat courtesy of https://codepen.io/mehmetmert/pen/zYZRKZ */
/* #live-chat {
    position: relative;
    left: 0;
    box-shadow: rgba(100, 100, 111, 0.2) 0 7px 29px 0;
    font-size: 16px;
}

/* Specific change for Gin Admin theme */
#live-chat #gin_sidebar {
  display: none;
}

#live-chat input[type="submit"].chat-form-send {
  display: none;
}

#live-chat header {
    padding: 16px 24px;
    cursor: pointer;
    color: #fff;
    border-radius: 5px 5px 0 0;
    background: #293239;
    display: none;
}

#live-chat h4::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 8px 0 0;
  content: "";
  border-radius: 50%;
  background: #1a8a34;
}

#live-chat h4 {
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: #fff;
}

#live-chat h5 {
	position: relative;
	font-size: 10px;
	left: 6px;
	top: 6px;
}

#live-chat form {
  padding: 14px;
}

#live-chat form label {
  display: none;
}

#live-chat form .form-item {
  margin-block: 0;
}
/*  
#live-chat textarea {
    width: 100%;
    min-height: 65px;
    max-height: 130px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.3333);
    border-radius: 12px;
    outline: none;
}
 */
.chat-message-counter {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  width: 28px;
  height: 28px;
  margin: -15px 0 0 -15px;
  text-align: center;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #e62727;
  font-size: 12px;
  font-weight: bold;
  line-height: 28px;
}

.chat-close {
  display: block;
  float: right;
  width: 16px;
  height: 16px;
  margin: 2px 0 0 0;
  text-align: center;
  color: #fff;
  border-radius: 50%;
  background: #1b2126;
  font-size: 10px;
  line-height: 16px;
}

.chat {
  display: none;
  
}

.chat-history {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 6px;
}

.chat-message {
  margin: 5px 0;
}

.chat-message img {
  float: left;
  width: 50px;
  height: 50px;
  border-radius: 20%;
    margin-left: 35px;
}

.chat-message-content {
  margin-left: 56px;
}

.chat-time {
  float: right;
  font-size: 10px;
}

.chat-feedback {
  margin: 0 0 0 80px;
  font-style: italic;
}



.chat-message .loader {
  --chat-loader: no-repeat radial-gradient(circle closest-side, #fff 80%, #0000);

  width: 50px;
  animation: l7 1s infinite linear;
  background:
    var(--chat-loader) 0% 50%,
    var(--chat-loader) 50% 50%,
    var(--chat-loader) 100% 50%;
  background-size: calc(100% / 3) 100%;
  aspect-ratio: 4;
}

@keyframes l7 {
  33% {
    background-size:
      calc(100% / 3) 0%,
      calc(100% / 3) 100%,
      calc(100% / 3) 100%;
  }

  50% {
    background-size:
      calc(100% / 3) 100%,
      calc(100% / 3) 0%,
      calc(100% / 3) 100%;
  }

  66% {
    background-size:
      calc(100% / 3) 100%,
      calc(100% / 3) 100%,
      calc(100% / 3) 0%;
  }
}


.loader{
  position: absolute;
    margin-top: -25px;
}


@media (max-width: 640px) {
  #live-chat {
    top: 0vh;
    height: 92vh;
  }

.runic-keys {
	width: 94vw;
	min-height: 45vh;
	height: auto;
	margin: -40px auto 10px auto;
}

#edit-query {
	width: 165px;
	height: 165px !important;
	font-size: 26px;
	padding: 23px;
}

.chat-message img {
	float: left;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	z-index: 1;
	position: relative;
	margin-left: 17px;
}

.chat-message-message {
	width: 85vw;
	max-width: 100%;
	/* margin: 0px auto; */
	padding: 8px;
}

  .chat-message-content {
    margin-left: 6px;
  }
  
.r-button.action {
	position: static;
	margin: 2px;
	width: auto;
	height: auto;
	font-size: 20px;
	padding: 7px;
	transform: none;
	display: flex;
}
.r-button.clear {
	position: static;
	margin: 3px;
	width: auto;
	height: 40px;
	font-size: 16px;
	padding: 2px;
	border-radius: 6px;
	transform: none;
}
  
}

@media (max-width: 640px) {
  .chat-message img {
    margin-left: -5px;
  }
}

#user-balance{
  color: white;
  text-align: right;
  margin: 10px 10px;
}


