*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
    /* default tailwind border color */
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

body {
    margin: 0;
    line-height: inherit;
    font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
    /* letter-spacing: 0.5px; */
    word-spacing: 0.5px;
}


img,
svg {
    display: block;
}

:root {
    /* Colors */
    --fs-primary: #fb2c36;
    /* Tailwind red-600 (Nav) */
    --fs-primary-dark: #ff6900;
    /* Tailwind red-800 (User Msg) */
    --fs-bg-light: #fbfcfd;
    /* Your specific background color */
    --fs-text-main: #1f2937;
    /* Dark gray for readability */
    /* Spacing & Sizes */
    --fs-chat-width: 400px;
    --fs-chat-height: 552px;
    /* Your 138 units */
    --fs-radius: 12px;
    /* Animation Timing */
    --fs-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chat-bot-logo {
    /* Position & Layout */
    position: fixed;
    bottom: 20px;
    /* bottom-5 */
    right: 28px;
    /* right-7 */
    /* Size & Shape */
    width: 100px;
    /* w-25 */
    height: 100px;
    /* Assuming square for rounded-full */
    border-radius: 50%;
    /* rounded-full */
    /* Flex Centering */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Interaction */
    cursor: pointer;
    background-color: transparent;
    /* Default state */
    transition: all var(--fs-transition);
    /* Using our root variable */
    z-index: 999;
    display: none;
}

@media(max-width:425px) {
    #chat-bot-logo {
        height: 75px;
        width: 75px;
    }
}

#helpPopup {
    /* padding: 8px; */
    height: 50px;
    display: flex;
    width: 231px;
    position: fixed;
    font-size: 14px;
    font-weight: 600;
    background-color: #e6e9f0b4;
    bottom: 100 px;
    right: 25px;
    border-radius: 8px 8px 0 8px;
    /* gap: 10px; */
    justify-content: center;
    align-items: center;
    box-shadow: 3px 3px 9px;
}

    #helpPopup img {
        margin: 5px;
    }

    #helpPopup p {
        margin-left: 5px;
    }

#mainPop {
    color: red;
    font-weight: 900;
    /* font-s */
}

#helpPopup img {
    /* padding: 8px; */
    height: 45px;
}

.helpPopupAnimate {
    animation: blink 1.7s infinite ease-in;
}

@keyframes blink {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.9)translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media(max-width:425px) {
    #helpPopup {
        width: 178px;
        height: 45px;
        font-size: 11px;
    }

        #helpPopup img {
            width: 25px;
        }

        #helpPopup p {
            margin-left: 3px;
        }
}


@media(max-width:320px) {
    #chat-bot-logo {
        height: 70px;
        width: 70px;
    }
}

#chat-bot-logo.show {
    display: flex;
}

/* hover:bg-blue-200 */
.fs-logo-trigger:hover {
    background-color: #bfdbfe;
    /* Tailwind blue-200 */
    transform: scale(1.05);
    /* Optional: Slight growth on hover */
}

/* The "Click" feedback */
.fs-logo-trigger:active {
    transform: scale(0.9);
    filter: brightness(0.9);
}

.fs-logo-img {
    width: 97%;
    /* Adjust based on your logo design */
    height: auto;
}

#chat-bot {
    /* Mobile-First: Full Screen (h-screen w-full) */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 85px;
    /* bg-[#fbfcfd] & Layout */
    background-color: var(--fs-bg-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    display: none;
}

@media(max-width:640px) {
    #chat-bot {
        height: 97%;
    }
}

#chat-bot.show {
    display: flex !important;
}

/* Navigation Container */
#chat-nav {
    width: 100%;
    height: 55px;
    /* h-23.2 */
    background-color: var(--fs-primary);
    /* Red-500 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    /* shrink-0 */
    padding: 0 12px;
    /* m-3/m-2 equivalent */
}

    #chat-nav.is-visible {
        display: flex;
    }

/* Logo Circle */
#chat-nav-logo {
    height: 35px;
    /* h-7 */
    width: 35px;
    background-color: #bfdbfe;
    /* bg-blue-200 */
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media(min-width:425px) {
    .nav-action-btn {
        height: 35px;
        width: 35px;
    }
}

@media(min-width:375px) {
    .nav-action-btn {
        height: 35px;
        width: 35px;
    }
}

@media(min-width:320px) {
    .nav-action-btn {
        height: 35px;
        width: 35px;
    }
}

/* Title & Subheading Wrapper */
#chat-bot-nav-title {
    flex-grow: 1;
    margin-left: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: #f5f5f5;
    /* text-neutral-100 */
}

#chat-bot-nav-title-main-heading {
    font-size: 20px;
    /* text-xl */
    font-weight: 700;
    line-height: 1.2;
}

#chat-bot-nav-title-main-sub-heading {
    font-size: 12px;
    /* text-xs */
    color: #e5e5e5;
    /* text-neutral-200 */
}

/* Action Buttons (Restart & Down Arrow) */
.nav-action-btn {
    background-color: #bfdbfe;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
    transition: transform var(--fs-transition);
}

.back-img {
    height: 71%;
    width: 30px;
    margin-top: 4px;
}

.reload {
    /* position: fixed; */
    bottom: 53px;
    right: 51px;
    z-index: 10;
    color: blue;
    text-decoration: underline;
    font-size: 15px;
    height: auto;
    display: flex;
    /* align-items: ; */
    justify-content: right;
    margin: 2px;
    padding: 2px;
    cursor: pointer;
    margin-right: 15px;
    align-items: center;
    gap: 7px;
    user-select: none;
}

    .reload:active {
        text-decoration: none;
    }

@media(max-width:425px) {
    .reload {
        bottom: 10px;
        right: 10px;
        max-height: 50px;
        height: 10px;
    }
}

.nav-action-btn:active {
    transform: scale(0.9);
}

/* sm: Breakpoint (640px+) */
@media (min-width: 640px) {
    #chat-nav-logo {
        height: 44px;
        /* sm:h-11 */
        width: 44px;
    }

    #chat-bot-nav-title-main-heading {
        font-size: 18px;
        /* sm:text-lg */
    }

    .nav-action-btn {
        height: 40px;
        /* sm:h-10 */
        width: 40px;
    }
}

#chat-bot-chat {
    /* flex-1 */
    flex: 1 1 0%;
    /* w-full */
    width: 100%;
    /* p-2 */
    padding: 8px;
    /* flex flex-col */
    display: flex;
    flex-direction: column;
    /* overflow-y-auto overflow-x-hidden */
    overflow-y: auto;
    overflow-x: hidden;
    /* This is the secret for your animations */
    scroll-behavior: smooth;
    /* Reserves space for the scrollbar so messages don't jump when it appears */
    scrollbar-gutter: stable;
}

    /* Custom Scrollbar Styling (The 'scroll-bar-custom' class) */
    #chat-bot-chat::-webkit-scrollbar {
        width: 6px;
    }

    #chat-bot-chat::-webkit-scrollbar-track {
        background: transparent;
    }

    #chat-bot-chat::-webkit-scrollbar-thumb {
        background: #d1d5db;
        /* A neutral gray so it doesn't distract from the red */
        border-radius: 10px;
    }

    #chat-bot-chat:hover::-webkit-scrollbar-thumb {
        background: var(--fs-primary);
        /* Turns red when user interacts with the chat */
    }

#lang2 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2px;
    border-radius: 5px;
    /* color: #bfdbfe; */
    background-color: #bfdbfe;
    padding: 5px;
    font-size: small;
    font-weight: 600;
}

#en {
    cursor: pointer;
    padding: 2px;
}

#mr {
    cursor: pointer;
    padding: 2px;
}

.langInActive {
    /* color: #fc9502; */
    font-size: 10px;
    color: grey;
}

/* sm: (Desktop Breakpoint - 640px and up) */
@media (min-width: 640px) {
    #chat-bot {
        /* Position: sm:fixed sm:bottom-12 sm:right-10 */
        top: auto;
        left: auto;
        bottom: 48px;
        /* 12 * 4px */
        right: 40px;
        /* 10 * 4px */
        /* Size: sm:h-138 sm:w-100 */
        width: 350px;
        /* 100 * 4px */
        height: 470px;
        /* 138 * 4px */
        /* Decoration: shadow-xl sm:rounded-lg */
        border-radius: var(--fs-radius);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
}

/* Define the Keyframes */
@keyframes message-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Create the Animation Class */
.animate-message-in {
    animation: message-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    /* Optimization: Tell the browser to prepare for these changes */
    will-change: transform, opacity, filter;
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(5px);
        /* Very slight lift to make it feel less static */
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

@keyframes fade {
    0% {
        opacity: 0;
    }

    40% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}
/* https://we.tl/t-NSpPryn78BJrNKX9 */

.animate-fade {
    animation: fade 1.2s ease-out forwards;
}

@keyframes fade-rot {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(15px) scale(0.7);
    }
}

@keyframes fade-rot-rev {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.7);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-rot {
    animation: fade-rot 0.2s ease-out forwards;
}

.animate-fade-rot-reverse {
    animation: fade-rot 0.4s ease-in reverse;
}

@keyframes chat-visible {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    25% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes chat-visible-rev {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-chat {
    animation: chat-visible 0.4s ease-out forwards;
}

@keyframes closeChatClick {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.animate-click {
    animation: closeChatClick 1s;
}

.animate-chat-reverse {
    animation: chat-visible-rev 0.2s ease-out reverse;
}

.scroll-bar-custom {
    scrollbar-gutter: stable;
}

#chat-bot-chat::-webkit-scrollbar {
    width: 3px;
}

#chat-bot-chat::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#chat-bot-chat::-webkit-scrollbar-thumb {
    background: #ef4444;
    /* Tailwind red-500 to match your header */
    border-radius: 10px;
}

    #chat-bot-chat::-webkit-scrollbar-thumb:hover {
        background: #dc2626;
        /* Tailwind red-600 */
    }

.nav-circle {
    display: flex;
    /* flex */
    flex-direction: column;
    /* flex-col */
    justify-content: center;
    /* justify-center */
    align-items: center;
    /* items-center */
}

.bot-message {
    /* flex & items-center */
    display: flex;
    align-items: center;
    /* justify-start */
    justify-content: flex-start;
    /* ml-1 & mt-3 */
    margin-left: 4px;
    /* 1 * 4px */
    margin-top: 12px;
    /* 3 * 4px */
}

@media(max-width:640px) {
    .bot-message {
        width: 97%;
    }
}

.bot-message-logo {
    /* h-7 w-7 */
    height: 28px;
    width: 28px;
    overflow: hidden;
    /* Ensures nothing leaks out of the circle/box */
    display: flex;
    justify-content: center;
    align-items: center;
}

    .bot-message-logo img {
        width: 100%;
        height: 100%;
        /* Use 'cover' to fill the circle completely,
     or 'contain' if you want the whole icon to fit inside with a gap */
        object-fit: cover;
    }

@media (min-width: 640px) {
    .bot-message-logo {
        /* sm:h-11 sm:w-11 */
        height: 44px;
        width: 44px;
    }
}

.bot-message-text {
    /* ml-1 */
    margin-left: 4px;
    /* w-66 */
    width: 264px;
    /* p-3 */
    padding: 12px;
    /* bg-neutral-100 */
    background-color: #f5f5f5;
    /* rounded-md */
    border-radius: 6px;
}

@media (max-width: 640px) {
    .bot-message-text {
        /* sm:w-80 */
        width: 90%;
    }
}

.bot-message-que {
    /* text-md */
    font-size: 15px;
    /* font-semibold */
    font-weight: 600;
    /* mb-1 */
    margin-bottom: 4px;
}

.bot-message-ol {
    /* list-decimal */
    list-style-type: decimal;
    /* pl-7 */
    padding-left: 28px;
    /* text-sm */
    font-size: 14px;
}

.description {
    /* text-sm */
    font-size: 14px;
}

.bot-date {
    /* text-xs */
    font-size: 12px;
    /* mt-2 */
    margin-top: 8px;
    /* text-neutral-600 */
    color: #525252;
}

.option-div {
    /* p-2 pl-3 */
    padding: 8px 8px 8px 12px;
    /* w-66 m-2 ml-15 */
    width: 264px;
    margin: 8px 8px 8px 60px;
    /* bg-neutral-100 border border-transparent */
    background-color: #f5f5f5;
    border: 1px solid transparent;
    /* rounded-md cursor-pointer text-md font-semibold */
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    /* Handling hover state */
    transition: border-color 0.2s ease;
}

    .option-div:hover {
        /* hover:border-red-600 */
        border-color: #dc2626;
    }

#optionDiv {
    width: auto;
}

.option-button {
    padding: 8px 8px 8px 12px;
    /* w-66 m-2 ml-15 */
    width: 264px;
    /* margin: 8px 8px 8px 60px; */
    margin: 9px;
    /* bg-neutral-100 border border-transparent */
    background-color: #fb2c36;
    border: 1px solid transparent;
    /* rounded-md cursor-pointer text-md font-semibold */
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #f5f5f5;
    /* Handling hover state */
    transition: border-color 0.2s ease;
    border: 2px solid transparent;
}

    .option-button:hover {
        border: 2px solid oklch(70.7% 0.165 254.624);
    }

#htmlOptionDiv {
    width: auto;
    max-width: 70%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 60px;
}

select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
}

#lang-select {
    background-color: #bfdbfe;
    padding: 2px;
    margin: 2px;
    margin-right: 4px;
    border-radius: 30px;
    cursor: pointer;
}

    #lang-select:active {
        border: none;
    }

@media(max-width:375px) {
    #htmlOptionDiv {
        margin-left: 50px;
    }
}

@media(max-width:640px) {
    .option-div {
        margin: 8px 8px 8px 65px;
        width: 80%;
    }

    #optionDiv {
        width: 90%
    }
}

@media(max-width:467px) {
    .option-div {
        margin: 8px 8px 8px 62px;
        width: 80%;
    }
}

@media(max-width:437px) {
    .option-div {
        margin: 8px 8px 8px 60px;
        width: 78%;
    }
}

@media(max-width:375px) {
    .option-div {
        margin: 8px 8px 8px 55px;
        width: 78%;
    }
}

.user-select {
    /* flex */
    display: flex;
    /* flex-col */
    flex-direction: column;
    /* justify-center */
    justify-content: center;
    /* items-center */
    align-items: center;
}

.user-message {
    /* flex flex-col justify-center items-center */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* p-1 m-2 mt-4 ml-37 */
    padding: 4px;
    margin: 16px 8px 8px 148px;
    /* w-42 rounded-md cursor-pointer */
    width: 168px;
    border-radius: 6px;
    cursor: pointer;
    /* bg-orange-400 text-neutral-100 shadow-lg */
    background-color: #fb923c;
    color: #f5f5f5;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* text-md font-semibold */
    font-size: 14px;
    font-weight: 600;
}

@media (min-width: 640px) {
    .user-message {
        /* sm:w-45 sm:ml-41 */
        width: 180px;
        margin-left: 164px;
    }
}



/* loader */
/* #loader{
  padding: 5px;
  margin: 20px;
  background-color: #525252;
  color: #bfdbfe;
  display: flex;
  font-size: 20px;
  height: 25px;
  justify-content: center;
  align-items: center;
  gap: 3px;
  border-radius: 25%;
  max-width: 60px;
} */

#loader {
    margin-left: 35px;
}

    #loader span {
        height: 6px;
        width: 6px;
        background-color: black;
        display: inline-block;
        animation: dance 1s infinite ease-in-out both;
        border-radius: 50%;
        margin: 2px;
    }

        #loader span:nth-child(1) {
            animation-delay: -0.32s;
        }

        #loader span:nth-child(1) {
            animation-delay: -0.16s;
        }

@keyframes dance {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}
