
.chat-container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    position: fixed;
    bottom: 80px;
    right: 20px;
    height: 90%;
    max-height: 600px;
    width: 100%;
    max-width: 350px;
    z-index: 10000;
    display: none;
}

@media (min-width: 768px) {
    .chat-container {
        height: 600px;
        width: 350px;
    }
}

@media (max-width: 768px) {
    .chat-button {
        position: fixed;
        bottom: 116px !important;
        right: 20px;
        min-width: 56px;
        height: 56px;
        padding: 0 16px 0 12px;
        background-color: #007bff;
        border-radius: 28px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        z-index: 10001;
        user-select: none;
        color: #fff;
    }
}

@media (max-width: 376px) {
    .chat-container {
        right: 0px;
    }

    .chat-button {
        bottom: 50px;
        right: 12px;
        min-width: 48px;
        height: 48px;
        padding: 0 10px 0 8px;
    }

    .chat-button.is-panel-open {
        width: 48px;
        height: 48px;
        min-width: 48px;
        padding: 0;
    }

    .chat-button-text {
        font-size: 0.85rem;
    }

    .chat-button-icon {
        width: 20px;
        height: 20px;
    }
}

.chat-header {
    background-color: #007bff;
    color: #fff;
    padding: 15px 44px 15px 15px;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.chat-header-title {
    text-align: center;
}

.chat-header-close {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}

.chat-header-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.chat-messages {
    flex: 1;
    min-height: 0;
    padding: 15px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: flex-start;
}

.profile-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 10px;
}

.chat-message.bot .chat-message-actions {
    flex-basis: 100%;
    width: 100%;
    margin-top: 8px;
    margin-left: 0;
    padding-left: 52px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-action-link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chat-action-link:hover {
    filter: brightness(1.08);
}

button.chat-action-link {
    border: none;
    cursor: pointer;
    font: inherit;
    text-align: center;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.chat-message.bot .message-content {
    background-color: #f1f1f1;
    color: #333;
}

.chat-message.user .message-content {
    background-color: #007bff;
    color: #fff;
}

.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background-color: #6c757d;
    border-radius: 50%;
    animation: typing 1.5s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.chat-input {
    padding: 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}

.chat-input textarea {
    width: 100%;
    min-height: 88px;
    resize: none;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px;
    outline: none;
    background-color: #fff;
    color: #333;
    box-sizing: border-box;
}

.chat-input textarea::placeholder {
    color: #999;
}

.chat-input textarea:focus {
    border-color: #bbb;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.12);
}

.chat-input textarea:focus::placeholder {
    color: #aaa;
}

.chat-input button {
    margin-top: 10px;
    width: 100%;
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 20px;
    font-size: 1rem;
}

.chat-input button:hover {
    background-color: #0056b3;
}

.chat-button {
    position: fixed;
    bottom: 75px;
    right: 20px;
    min-width: 56px;
    height: 56px;
    padding: 0 16px 0 12px;
    background-color: #007bff;
    border-radius: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    user-select: none;
    color: #fff;
}

.chat-button-open-state {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-button-icon {
    flex-shrink: 0;
    color: #fff;
}

.chat-button-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.chat-button-close-state {
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    line-height: 1;
    font-weight: 300;
    color: #fff;
}

.chat-button.is-panel-open {
    width: 56px;
    min-width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
}

.chat-button.is-panel-open .chat-button-open-state {
    display: none;
}

.chat-button.is-panel-open .chat-button-close-state {
    display: flex;
}
