/* =========================================================
   SUTHAN INFOTECH AI CHAT
   ========================================================= */

:root {
    --si-navy: #071a3d;
    --si-blue: #1261d8;
    --si-green: #168a45;
    --si-light: #f5f8fc;
    --si-text: #172033;
}


/* =========================================================
   CHAT BUTTON
   ========================================================= */

.si-chat-button {

    position: fixed;

    right: 25px;
    bottom: 25px;

    width: 62px;
    height: 62px;

    background: linear-gradient(
        135deg,
        var(--si-blue),
        var(--si-navy)
    );

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow:
        0 8px 30px rgba(0,0,0,.25);

    z-index: 99998;

    transition: all .3s ease;
}


.si-chat-button:hover {

    transform: translateY(-4px) scale(1.05);

}


.si-chat-icon {

    font-size: 29px;

}


.si-chat-notification {

    position: absolute;

    top: -2px;
    right: -2px;

    width: 21px;
    height: 21px;

    background: #e53935;

    color: #fff;

    border-radius: 50%;

    font-size: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;

}


/* =========================================================
   CHAT BOX
   ========================================================= */

.si-chat-box {

    position: fixed;

    right: 25px;
    bottom: 100px;

    width: 380px;
    max-width: calc(100vw - 30px);

    height: 600px;
    max-height: calc(100vh - 130px);

    background: #fff;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 15px 50px rgba(0,0,0,.25);

    z-index: 99999;

    display: none;

    flex-direction: column;

    border: 1px solid #e5e9f0;

}


.si-chat-box.active {

    display: flex;

    animation: siChatOpen .25s ease;

}


@keyframes siChatOpen {

    from {

        opacity: 0;
        transform: translateY(20px) scale(.97);

    }

    to {

        opacity: 1;
        transform: translateY(0) scale(1);

    }

}


/* =========================================================
   HEADER
   ========================================================= */

.si-chat-header {

    background:
        linear-gradient(
            135deg,
            var(--si-navy),
            var(--si-blue)
        );

    color: #fff;

    padding: 17px;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.si-chat-header-left {

    display: flex;

    align-items: center;

    gap: 11px;

}


.si-ai-avatar {

    width: 43px;
    height: 43px;

    border-radius: 50%;

    background: rgba(255,255,255,.15);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 22px;

}


.si-chat-title {

    font-size: 15px;

    font-weight: 700;

}


.si-chat-status {

    margin-top: 3px;

    font-size: 11px;

    opacity: .9;

}


.si-chat-status span {

    display: inline-block;

    width: 7px;
    height: 7px;

    background: #39d353;

    border-radius: 50%;

    margin-right: 4px;

}


.si-chat-close {

    border: none;

    background: transparent;

    color: #fff;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;

}


/* =========================================================
   USER FORM
   ========================================================= */

.si-user-form {

    padding: 22px;

    background: #fff;

}


.si-welcome {

    margin-bottom: 18px;

}


.si-welcome h3 {

    margin: 0 0 5px;

    color: var(--si-navy);

    font-size: 20px;

}


.si-welcome p {

    margin: 0;

    color: #697386;

    font-size: 13px;

}


.si-user-form input {

    width: 100%;

    height: 46px;

    padding: 0 14px;

    margin-bottom: 12px;

    border: 1px solid #dce2eb;

    border-radius: 9px;

    outline: none;

    font-family: inherit;

    font-size: 13px;

    box-sizing: border-box;

}


.si-user-form input:focus {

    border-color: var(--si-blue);

    box-shadow:
        0 0 0 3px rgba(18,97,216,.08);

}


.si-start-button {

    width: 100%;

    height: 46px;

    border: none;

    border-radius: 9px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--si-blue),
            var(--si-navy)
        );

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

}


.si-start-button:hover {

    opacity: .92;

}


.si-form-error {

    color: #d32f2f;

    font-size: 12px;

    margin-top: 10px;

}


/* =========================================================
   CHAT CONTENT
   ========================================================= */

.si-chat-content {

    display: none;

    flex: 1;

    min-height: 0;

    flex-direction: column;

    background: var(--si-light);

}


.si-messages {

    flex: 1;

    overflow-y: auto;

    padding: 15px;

}


.si-message {

    display: flex;

    margin-bottom: 14px;

    max-width: 90%;

}


.si-message-ai {

    align-items: flex-start;

}


.si-message-user {

    margin-left: auto;

    justify-content: flex-end;

}


.si-message-avatar {

    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    background: var(--si-navy);

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 15px;

    margin-right: 7px;

}


.si-message-text {

    padding: 10px 13px;

    border-radius: 12px;

    background: #fff;

    color: var(--si-text);

    font-size: 13px;

    line-height: 1.55;

    box-shadow:
        0 2px 7px rgba(0,0,0,.05);

}


.si-message-user .si-message-text {

    background: var(--si-blue);

    color: #fff;

    border-radius: 12px 12px 3px 12px;

}


/* =========================================================
   TYPING
   ========================================================= */

.si-typing {

    display: none;

    padding: 5px 15px 8px;

    font-size: 11px;

    color: #7c8799;

}


.si-typing span {

    display: inline-block;

    width: 5px;
    height: 5px;

    background: #7c8799;

    border-radius: 50%;

    margin-right: 2px;

    animation: siTyping 1s infinite;

}


.si-typing span:nth-child(2) {

    animation-delay: .15s;

}


.si-typing span:nth-child(3) {

    animation-delay: .3s;

}


@keyframes siTyping {

    0%, 60%, 100% {
        opacity: .3;
    }

    30% {
        opacity: 1;
    }

}


/* =========================================================
   INPUT
   ========================================================= */

.si-chat-input-area {

    display: flex;

    padding: 10px;

    background: #fff;

    border-top: 1px solid #e5e9f0;

}


.si-chat-input-area textarea {

    flex: 1;

    resize: none;

    border: 1px solid #dce2eb;

    border-radius: 9px;

    padding: 10px 12px;

    font-family: inherit;

    font-size: 13px;

    outline: none;

    max-height: 80px;

}


.si-chat-input-area textarea:focus {

    border-color: var(--si-blue);

}


.si-send-button {

    width: 43px;
    height: 43px;

    margin-left: 7px;

    border: none;

    border-radius: 9px;

    color: #fff;

    background: var(--si-blue);

    cursor: pointer;

    font-size: 18px;

}


.si-send-button:hover {

    background: var(--si-navy);

}


.si-send-button:disabled {

    opacity: .5;

    cursor: not-allowed;

}


/* =========================================================
   FOOTER
   ========================================================= */

.si-chat-footer {

    background: #fff;

    text-align: center;

    padding: 6px;

    font-size: 9px;

    color: #9aa3b2;

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .si-chat-button {

        right: 15px;
        bottom: 15px;

        width: 57px;
        height: 57px;

    }


    .si-chat-box {

        right: 10px;
        bottom: 82px;

        width: calc(100vw - 20px);

        height: calc(100vh - 105px);

        max-height: none;

        border-radius: 15px;

    }

}