.ai-chatbox {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    max-width:970px;
}

.ai-form {
    width: 100%;
    max-width: 970px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
     margin-top:10px; 
}

.ai-chatbox.initial-state {
    width: 100%;
        max-width: 968px;
    margin: 0 auto;
    opacity: 1;
    position: relative;
    z-index: 0;
    overflow: hidden;
    height: 640px;
}

.ai-chatbox.initial-state .ai-chatbox-content {
    display: flex;
    gap: 36px;
    align-items: center;
    flex-direction: column;
    height: 640px;
        width: 100%;
        max-width: 968px;
            margin: 0 auto;
    text-align: center;
    justify-content: center;
}

.ai-chatbox.initial-state .ai-form {
    margin: 0;
}

.ai-chatbox.initial-state .ai-reset {
    display: none;
}

.ai-chatbox.initial-state #chat-messages {
    display: none;
}

.ai-chatbox.initial-state h2 {
    font-size: 36px;
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

#chat-messages {
    padding: 20px;
    height: 640px;
    max-width: 970px;
    margin: auto;
    width: 100%;
    overflow-y: auto;
}


.chat-message {
    padding: 10px 20px;
    margin-bottom: 16px;
    border-radius: 24px;
    max-width: 90%;
    line-height: 1.4;
    display: inline-block;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chat-message.user {
    background: #0000001A;
    backdrop-filter: blur(30px);
    text-align: left;
    align-self: flex-end;
    float: right;
    clear: both;
border-top-left-radius: 24px;
border-top-right-radius: 24px;
border-bottom-right-radius: 6px;
border-bottom-left-radius: 24px;
padding-top: 12px;
padding-right: 24px;
padding-bottom: 12px;
padding-left: 24px;

}

.chat-message.assistant {
    text-align: left;
    align-self: flex-start;
    float: left;
    clear: both;
  background: #fff;
  color:#000;
  backdrop-filter: blur(30px);
border-top-left-radius: 24px;
border-top-right-radius: 24px;
border-bottom-right-radius: 24px;
border-bottom-left-radius: 6px;
border-width: 1px;
padding-top: 12px;
padding-right: 24px;
padding-bottom: 12px;
padding-left: 24px;

}

.dark .chat-message.assistant
{
    background:rgba(48, 48, 48, 1);
    color:#fff;
    border: 1px solid #303030
}

.chat-message.assistant a {
    color: #007aa4; 
    text-decoration: underline;
}

.chat-message ol {
    margin: 10px 0;
    padding-left: 20px;
}

.chat-message ol li {
    list-style-type: decimal;
    margin-bottom: 5px;
    color: #333;
}

.input-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    max-width: 970px;
    width: 100%;
    height: auto;
    padding: 12px 12px 12px 32px;
    border: 1px solid #CED1D3;
    border-radius: 2.5rem;
    margin: 0 auto;
}


.ai-chatbox.initial-state .input-wrapper {
    max-width: 970px;
    min-height:78px;
    height: auto;
    width: calc(100% - 20px);
    position: absolute;
    bottom: 100px;
}

#ai-chat-ai-chat-input {
    flex: 1;
      font-family: Open Sans;
font-weight: 600;
font-size: 16px;
line-height: 140%;
    outline: none;
    background: transparent;
    border: none;
    resize: none;
    overflow-y: hidden;
    padding-right: 10px;
    color: #000;
}

.dark #ai-chat-ai-chat-input
{
      color: #fff!important;
}

.input-wrapper button {
    background: #007AA4;
    color: white;
    border: none;
    border-radius: 100%;
    /* width: 60px;
    height: 60px; */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    cursor: pointer;
}

/* .input-wrapper button:hover {
    background: #333;
} */
 .input-wrapper button:disabled {
    cursor: not-allowed;
}


#ai-chat-loading {
    text-align: center;
    padding: 10px;
    font-style: italic;
    color: #888;
    clear: both;
}

button.ai-reset {
    font-size: 24px;
}


@keyframes dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
    100% { content: '.'; }
}

#ai-chat-loading::after {
    content: '.';
    animation: dots 1.5s infinite steps(1, end);
}

/* Style for AI chat table */
.ai-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
}

.ai-html table th,
.ai-html table td {
    border: 1px solid rgb(0, 122, 164)!important;
    padding: 8px!important;
    text-align: left;
}

.ai-html table th {
    background-color: rgb(0, 122, 164);
    color: white;
    font-weight: bold;
}

.ai-html table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ai-html table tr:hover {
    background-color: #f1f1f1;
}
.dark .ai-html table {
    background-color: #222;
    color: #fff;
}

.dark .ai-html table th {
    background-color: #007aa4;
    color: #fff;
}

.dark .ai-html table td {
    background-color: #222;
    color: #fff;
}

.dark .ai-html table tr:nth-child(even) {
    background-color: #2c2c2c;
}

.dark .ai-html table tr:hover {
    background-color: #333;
}

.dark .ai-html table,
.dark .ai-html table th,
.dark .ai-html table td {
    border-color: #007aa4 !important;
}

.dark .ai-html tr:nth-child(even) {
    background-color: #505050;
}

.ai-chatbox h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.chat-message ul {
    margin: 0;
    padding-left: 20px;
}

.chat-message ul li {
    list-style-type: disc;
    margin-bottom: 5px;
    color: #333;
}

.typing-cursor {
  display: inline-block;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}
.input-wrapper button.ai-reset {
  background: none;
  border: none;
  color: #888;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 28px;
  margin-left: 30px;
}

.ai-reset button:hover {
  color: #7e0000;
}

.ai-html
{
    padding:20px;
}

.ai-html p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #000;
}

.ai-html ul, .ai-html ol {
    margin-bottom: 1rem;
}

.typing-cursor {
  display: inline-block;
  font-weight: bold;
  font-size: 20px;
  color: #007aa4;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}
.ai-reset:hover {
  color: #7e0000;
}

@media screen and (max-width: 768px) {
    .chat-message.assistant {
        padding: 10px 0px;
        max-width: 100%;
    }
    .ai-reset {
        display: none;
    }
}

.dark .chat-message.user {
    background: #000;
    color: #fff;
}

.dark .ai-form .input-wrapper textarea{
    background-color: transparent;
    
}

.dark .ai-chatbox
{
      background-color: transparent;
}

.dark .ai-chatbox p, .dark .ai-chatbox li, .dark .ai-chatbox h2, .dark .ai-chatbox h3 {
    color: #fff;
}

.dark .input-wrapper button {
    background: #777;
    color: #fff;
}

.dark .input-wrapper {
    background: transparent;
}

.dark .input-wrapper input {
    background: transparent;
    color: #fff;
    border: none;
}

.dark .ai-chatbox.initial-state .input-wrapper input {
    color: #333;
}

.dark .ai-chatbox.initial-state .input-wrapper {
    width: calc(100% - 20px);
    border-color: #333;
}

.dark .input-wrapper button.ai-reset {
    background: transparent!important;
}

.dark .ai-chatbox.initial-state input:autofill {
    background-color: transparent!important;
    color: #fff !important;
}

.ai-chatbox.initial-state::before {
  content: "";
  position: absolute;
  border-radius: 100%;
  inset: -50%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1) 70%);
  animation: moveLight 6s linear infinite;
  z-index: -1;
  pointer-events: none;
  transform: scale(1.5);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ai-chatbox.initial-state:hover::before {
  opacity: 1;
}

@keyframes moveLight {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1.5);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1.5);
  }
}

.dark #page p {
    color: #fff!important;
}

@media screen and (min-width: 768px) {
    .ai-chatbox.initial-state svg {
        width: 1420px!important;
    }
}

.ai-chat-loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
}
.ai-chat-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.ai-chatbox.initial-state {
    position: relative;
    overflow: hidden;
        max-width: 968px;
    width: 100%;
    margin:0 auto;
}
.ai-chatbox.initial-state #ai-chat-chat-messages {
    display:none;
}
.learn-n-support-grid-info, .faq-feedback, .hrblizz-sec14 {
    display: none!important;
}
button.ai-reset {
    border: none;
    background: none;
    cursor: pointer;
}
.chat-messages {
    /* height: 640px; */
    overflow-y: auto;
    /* padding: 20px 0px; */
    /* margin-top:1.2rem; */
    margin-bottom: 20px;
     display: flex;
    flex-direction: column;
    gap: 12px;
    /* padding-right: 20px; */
}

.chat-messages::-webkit-scrollbar {
    width: 15px;
    background: transparent;
    border-radius: 100px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(200, 200, 200, 0.35);
    border-radius: 100px;
    border: 3px solid transparent;
    background-clip: padding-box;
    min-height: 40px;
    transition: background 0.2s;
}

#ai-chat
{
    height:fit-content;
    position: relative;
}

#screen-ai
{
    height:100%;

}

#ai-chat-ai-chat-loading {
    display: none;
    position: absolute;
    /* top: 50%;
    left: 50%; */
    /* transform: translate(-50%, -50%); */
    margin: 0 auto;
    width: 100%;
    top: calc(50% - 108px);
    z-index: 10;
}

.ai-form
{
  backdrop-filter: blur(0px);
}

.ai-form .input-wrapper {
   border-radius: 39px;
    padding: 4px 4px 4px 37px;
  transition: all 0.3s ease;
   background: #fff; 
   border: 1px solid #8C8C8C1A;
   backdrop-filter: blur(0px);
}

@media screen and (max-width: 768px) {
    .ai-form .input-wrapper {
        padding: 4px 8px 4px 16px;
    }
}

.dark .ai-form .input-wrapper  {
   background: transparent!important;
   border: 1px solid rgba(43, 43, 43, 1);
   min-height: 65px;
}

.ai-form .input-wrapper:focus-within {
  border: 1px solid transparent; 
  border-radius: 39px;
  background: 
    linear-gradient(#fff, #fff) padding-box, 
    linear-gradient(91.92deg, #007AA4 -11.93%, #FF9900 110.62%) border-box; 
}

.dark .ai-form .input-wrapper:focus-within
{
      border: 1px solid #007AA4;
}
.user-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: flex-end;
    position: relative;
    justify-content: space-evenly;
}

.chat-message.user {
    align-self: flex-end;
    position: relative;
    max-width:770px;
    width:100%;
}

.user-edit-btn {
    position: absolute;
    left: -28px; 
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
       color: #454D51;
    opacity: 0;
    transition: opacity 0.2s ease;
}.user-wrapper:hover .user-edit-btn {
    opacity: 1;
}
.chat-message.assistant {
    align-self: flex-start;
}
.ai-response-wrapper {
    display: flex;
    flex-direction: row;
    gap:16px;
    align-items: flex-end;
    margin-top: 12px;
}
.ai-reset-outside {
    align-self: flex-end;
    background: transparent;
    color: #454D51;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 24px;
}

.user-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.edit-btn {
  cursor: pointer;
}
.edit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}
.chat-message.user {
  order: 2; 
}
.edit-btn {
  order: 1;
}


.ai-form textarea {
  flex: 1;
    outline: none;
    font-family: Open Sans;
font-weight: 600;
font-size: 16px;
line-height: 140%;
    background: transparent;
}

.input-wrapper textarea {
  font-style: normal; 
}

.input-wrapper textarea::placeholder {
  font-style: italic; 
}

#ai-chat-ai-chat-input::placeholder {
  font-weight: 400;
}