/* =========================================================
   SOFTRENIX TECHNOLOGIES
   CHATBOT UI
========================================================= */

/* =========================================================
   CHATBOT CONTAINER
========================================================= */

.softrenix-chatbot {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 9999;
    font-family: inherit;
}


/* =========================================================
   CHATBOT FLOATING BUTTON
========================================================= */

.softrenix-chatbot-button {
    position: fixed;
    right: 30px;
    bottom: 30px;

    width: 72px;
    height: 72px;

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;

    background: linear-gradient(
    145deg,
    #059669,
    #047857
);
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 9999;

    box-shadow:
        0 15px 35px rgba(4, 120, 87, 0.28),
        0 5px 15px rgba(0, 0, 0, 0.12);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


/* CHAT ICON */

.softrenix-chatbot-button svg {
    width: 30px !important;
    height: 30px !important;

    display: block;

    stroke: #ffffff !important;
    stroke-width: 2 !important;

    fill: none !important;

    opacity: 1 !important;

    filter: none !important;
}


/* HOVER */

.softrenix-chatbot-button:hover {
    transform: translateY(-4px);

        background: linear-gradient(
        145deg,
        #10B981,
        #047857
    );

    box-shadow:
        0 20px 45px rgba(4, 120, 87, 0.35),
        0 0 25px rgba(16, 185, 129, 0.18);
}

/* ACTIVE */

.softrenix-chatbot-button:active {
    transform: translateY(-1px) scale(0.96);
}

/* =========================================================
   CHAT WINDOW
========================================================= */

.softrenix-chatbot-window {

    position: absolute;

    right: 0;
    bottom: 75px;

    width: 380px;
    height: 560px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(10, 15, 28, 0.98),
            rgba(3, 7, 18, 0.99)
        );

    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 22px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.02);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(18px)
        scale(0.97);

    transform-origin: bottom right;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}


.softrenix-chatbot-window.active {

    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   HEADER
========================================================= */

.softrenix-chatbot-header {

    min-height: 72px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    background:
        rgba(255, 255, 255, 0.025);
}


.softrenix-chatbot-brand {

    display: flex;
    align-items: center;
    gap: 11px;
}


.softrenix-chatbot-logo {

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.1);
}


.softrenix-chatbot-logo svg {

    width: 20px;
    height: 20px;

    stroke: #ffffff;
    fill: none;
}


.softrenix-chatbot-title {

    display: flex;
    flex-direction: column;
    gap: 3px;
}


.softrenix-chatbot-title strong {

    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    letter-spacing: -0.01em;
}


.softrenix-chatbot-status {

    display: flex;
    align-items: center;
    gap: 6px;

    color: rgba(255, 255, 255, 0.48);

    font-size: 11px;
}


.softrenix-chatbot-status-dot {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #6ee7b7;

    box-shadow:
        0 0 8px rgba(110, 231, 183, 0.6);
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.softrenix-chatbot-close {

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 9px;

    background: transparent;

    color: rgba(255, 255, 255, 0.55);

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.softrenix-chatbot-close:hover {

    background: rgba(255, 255, 255, 0.08);

    color: #ffffff;
}


.softrenix-chatbot-close svg {

    width: 18px;
    height: 18px;

    stroke: currentColor;
    fill: none;
}


/* =========================================================
   MESSAGES
========================================================= */

.softrenix-chatbot-messages {

    flex: 1;

    padding: 20px 16px;

    overflow-y: auto;

    display: flex;
    flex-direction: column;

    gap: 14px;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 255, 255, 0.12)
        transparent;
}


.softrenix-chatbot-messages::-webkit-scrollbar {

    width: 5px;
}


.softrenix-chatbot-messages::-webkit-scrollbar-track {

    background: transparent;
}


.softrenix-chatbot-messages::-webkit-scrollbar-thumb {

    background: rgba(255, 255, 255, 0.12);

    border-radius: 10px;
}


/* =========================================================
   MESSAGE
========================================================= */

.softrenix-chatbot-message {

    max-width: 85%;

    display: flex;
    flex-direction: column;

    gap: 5px;

    animation:
        chatbotMessageIn
        0.25s
        ease
        forwards;
}


.softrenix-chatbot-message.bot {

    align-self: flex-start;
}


.softrenix-chatbot-message.user {

    align-self: flex-end;

    align-items: flex-end;
}


.softrenix-chatbot-message-content {

    padding: 11px 13px;

    border-radius: 14px;

    font-size: 13px;
    line-height: 1.55;

    word-break: break-word;
}


.softrenix-chatbot-message.bot
.softrenix-chatbot-message-content {

    background:
        rgba(255, 255, 255, 0.055);

    border: 1px solid rgba(255, 255, 255, 0.07);

    color: rgba(255, 255, 255, 0.82);

    border-top-left-radius: 5px;
}


.softrenix-chatbot-message.user
.softrenix-chatbot-message-content {

    background:
        rgba(255, 255, 255, 0.12);

    border: 1px solid rgba(255, 255, 255, 0.1);

    color: #ffffff;

    border-top-right-radius: 5px;
}


/* =========================================================
   SUGGESTIONS
========================================================= */

.softrenix-chatbot-suggestions {

    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 2px;
}


.softrenix-chatbot-suggestion {

    padding: 8px 11px;

    border-radius: 9px;

    border: 1px solid rgba(255, 255, 255, 0.1);

    background:
        rgba(255, 255, 255, 0.035);

    color:
        rgba(255, 255, 255, 0.68);

    font-size: 11px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.softrenix-chatbot-suggestion:hover {

    background:
        rgba(255, 255, 255, 0.09);

    border-color:
        rgba(255, 255, 255, 0.18);

    color: #ffffff;
}


/* =========================================================
   TYPING INDICATOR
========================================================= */

.softrenix-chatbot-typing {

    align-self: flex-start;

    display: flex;
    align-items: center;

    gap: 4px;

    padding: 12px 14px;

    border-radius: 14px;

    border-top-left-radius: 5px;

    background:
        rgba(255, 255, 255, 0.055);

    border: 1px solid rgba(255, 255, 255, 0.07);
}


.softrenix-chatbot-typing span {

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.5);

    animation:
        chatbotTyping
        1.2s
        infinite ease-in-out;
}


.softrenix-chatbot-typing span:nth-child(2) {

    animation-delay: 0.15s;
}


.softrenix-chatbot-typing span:nth-child(3) {

    animation-delay: 0.3s;
}


/* =========================================================
   INPUT AREA
========================================================= */

.softrenix-chatbot-input-area {

    padding: 12px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);

    background:
        rgba(255, 255, 255, 0.025);
}


.softrenix-chatbot-input-wrapper {

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 6px 6px 6px 13px;

    border-radius: 13px;

    border: 1px solid rgba(255, 255, 255, 0.1);

    background:
        rgba(255, 255, 255, 0.045);

    transition:
        border-color 0.2s ease;
}


.softrenix-chatbot-input-wrapper:focus-within {

    border-color:
        rgba(255, 255, 255, 0.2);
}


.softrenix-chatbot-input {

    flex: 1;

    min-width: 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: #ffffff;

    font-family: inherit;

    font-size: 13px;
}


.softrenix-chatbot-input::placeholder {

    color:
        rgba(255, 255, 255, 0.35);
}


.softrenix-chatbot-send {

    width: 34px;
    height: 34px;

    flex-shrink: 0;

    border: 0;
    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.1);

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.softrenix-chatbot-send:hover {

    background:
        rgba(255, 255, 255, 0.17);

    transform: translateY(-1px);
}


.softrenix-chatbot-send svg {

    width: 16px;
    height: 16px;

    stroke: currentColor;
    fill: none;
}


/* =========================================================
   FOOTER NOTE
========================================================= */

.softrenix-chatbot-footer-note {

    margin-top: 8px;

    text-align: center;

    color:
        rgba(255, 255, 255, 0.25);

    font-size: 9px;

    letter-spacing: 0.02em;
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes chatbotMessageIn {

    from {

        opacity: 0;

        transform:
            translateY(5px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes chatbotTyping {

    0%,
    60%,
    100% {

        transform: translateY(0);

        opacity: 0.35;
    }

    30% {

        transform: translateY(-3px);

        opacity: 1;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .softrenix-chatbot {

        right: 16px;
        bottom: 16px;
    }


    .softrenix-chatbot-window {

        position: fixed;

        left: 12px;
        right: 12px;

        bottom: 84px;

        width: auto;

        height:
            min(
                600px,
                calc(100vh - 110px)
            );

        border-radius: 19px;
    }


    .softrenix-chatbot-button {

        width: 54px;
        height: 54px;
    }
}


@media (max-width: 380px) {

    .softrenix-chatbot-window {

        left: 8px;
        right: 8px;

        bottom: 78px;
    }
}