.chat-widget-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a853 0%, #c49a4a 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212, 168, 83, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-widget-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(212, 168, 83, 0.5);
}

.chat-widget-button svg {
    width: 28px;
    height: 28px;
    fill: #1a1a1a;
}

.chat-widget-panel {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 500px;
    max-height: calc(100vh - 140px);
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #333;
}

.chat-widget-panel.open {
    display: flex;
}

.chat-widget-header {
    background: linear-gradient(135deg, #d4a853 0%, #c49a4a 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-widget-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.chat-widget-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-widget-close svg {
    width: 20px;
    height: 20px;
    fill: #1a1a1a;
}

.chat-widget-close:hover svg {
    fill: #333;
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #d4a853 0%, #c49a4a 100%);
    color: #1a1a1a;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: #2a2a2a;
    color: #f5f5f5;
    border-bottom-left-radius: 4px;
}

.chat-message.error {
    align-self: center;
    background: #4a2020;
    color: #ff9999;
    font-size: 13px;
}

.chat-widget-typing {
    align-self: flex-start;
    padding: 12px 16px;
    background: #2a2a2a;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    display: none;
}

.chat-widget-typing.visible {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #d4a853;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.chat-widget-input-area {
    padding: 16px;
    background: #222;
    border-top: 1px solid #333;
    display: flex;
    gap: 12px;
}

.chat-widget-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #444;
    border-radius: 24px;
    background: #1a1a1a;
    color: #f5f5f5;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-widget-input:focus {
    border-color: #d4a853;
}

.chat-widget-input::placeholder {
    color: #888;
}

.chat-widget-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a853 0%, #c49a4a 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-widget-send:hover {
    transform: scale(1.05);
}

.chat-widget-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-widget-send svg {
    width: 20px;
    height: 20px;
    fill: #1a1a1a;
}

.chat-welcome {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 14px;
    line-height: 1.6;
}

.chat-welcome strong {
    color: #d4a853;
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.chat-welcome p {
    margin: 0 0 16px 0;
}

.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.chat-quick-btn {
    background: transparent;
    border: 1px solid #d4a853;
    color: #d4a853;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-quick-btn:hover {
    background: #d4a853;
    color: #1a1a1a;
}

.chat-link {
    color: #d4a853;
    text-decoration: underline;
    word-break: break-all;
}

.chat-link:hover {
    color: #e6c17a;
}

@media (max-width: 480px) {
    .chat-widget-panel {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .chat-widget-button {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
}
