.chat-widget {
    position: fixed;
    bottom: 5px;
    right: 20px;
    font-family: sans-serif;
    z-index: 9999;
}

.chat-toggle {
    position: relative;
    background-color: #f51919;
    color: white;
    padding: 14px 14px;
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    font-size: 18px;
    transition: transform 0.2s ease;
    z-index: 2;
    overflow: visible;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/*
.chat-toggle {
    position: relative;
    background-color: #4e73df;
    border-radius: 50%;
    padding: 12px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: pulse-circle 2s infinite;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
    */
.chat-toggle svg,
.chat-toggle img {
    width: 62px;
    height: 62px;
    display: block;
}

.chat-toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(248, 33, 33, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: pulse-circle 2s infinite;
    z-index: -1;
}

@keyframes pulse-circle {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-box {
    width: 320px;
    height: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 130px;
    right: 0;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}
@media (min-width: 768px) {
    .chat-box {
        width: 420px;
        height: 500px;
    }
}
@media (min-width: 1200px) {
    .chat-box {
        width: 500px;
        height: 550px;
    }
}
.chat-box.visible {
    transform: translateY(0);
    opacity: 1;
}
.widget-hidden {
    display: none;
}
.chat-header {
    background-color: #4e73df;
    color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}
.chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #f9f9f9;
}
.chat-message {
    margin-bottom: 10px;
}
.message-bubble {
    background: #e0e0e0;
    border-radius: 15px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 80%;
    font-size: 14px;
}
.chat-message.user {
    text-align: right;
}
.chat-message.user .message-bubble {
    background: #4e73df;
    color: white;
}
.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}
.chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
}
.chat-input button {
    background: #4e73df;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
}
.close-btn {
    background: none;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

@keyframes blink {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}
.typing-indicator {
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    color: #555;
}
.typing-indicator span {
    display: inline-block;
    animation-name: blink;
    animation-duration: 1.4s;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}
.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}