/* SILAS CHAT WIDGET - CHAVAIAS PREMIUM STYLE */
:root {
    --SILAS-bg: rgba(15, 23, 42, 0.85);
    --SILAS-accent: #3b82f6;
    --SILAS-user-msg: rgba(59, 130, 246, 0.2);
    --SILAS-bot-msg: rgba(255, 255, 255, 0.05);
    --SILAS-border: rgba(255, 255, 255, 0.1);
}

.SILAS-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Floating Trigger Icon */
.SILAS-trigger {
    width: 65px;
    height: 65px;
    background: var(--SILAS-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.SILAS-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 50px rgba(59, 130, 246, 0.7);
}

.SILAS-trigger svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

/* Chat Window */
.SILAS-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: var(--SILAS-bg);
    border: 1px solid var(--SILAS-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.SILAS-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.SILAS-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
    border-bottom: 1px solid var(--SILAS-border);
    display: flex;
    align-items: center;
    gap: 15px;
}

.SILAS-header img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--SILAS-accent);
    padding: 2px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.SILAS-header-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 800;
}

.SILAS-header-info p {
    margin: 0;
    font-size: 0.7rem;
    color: var(--SILAS-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    line-height: 1.2;
    max-width: 180px;
}

.SILAS-close {
    margin-left: auto;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    opacity: 0.5;
}

.SILAS-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.SILAS-close svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* Chat Messages */
.SILAS-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.SILAS-messages::-webkit-scrollbar {
    width: 6px;
}

.SILAS-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.msg {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-bot {
    align-self: flex-start;
    background: var(--SILAS-bot-msg);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--SILAS-border);
}

.msg-user {
    align-self: flex-end;
    background: var(--SILAS-user-msg);
    color: #fff;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: var(--SILAS-accent);
    border-radius: 50%;
    animation: pulseChat 1s infinite alternate;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulseChat {
    from {
        opacity: 0.3;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Input Area */
.SILAS-input-area {
    padding: 20px;
    border-top: 1px solid var(--SILAS-border);
    display: flex;
    gap: 12px;
}

.SILAS-input-area input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--SILAS-border);
    padding: 12px 18px;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.SILAS-input-area input:focus {
    outline: none;
    border-color: var(--SILAS-accent);
    background: rgba(0, 0, 0, 0.4);
}

.SILAS-send {
    background: var(--SILAS-accent);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.SILAS-send:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.SILAS-send svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

@media (max-width: 480px) {
    .SILAS-window {
        width: calc(100vw - 40px);
        height: 80vh;
        bottom: 80px;
    }
}