/* Hotel Chat Widget Pro - CSS Completo */
:root {
    --hcw-primary: #667eea;
    --hcw-primary-dark: #5568d3;
    --hcw-bg: #ffffff;
    --hcw-text: #333333;
    --hcw-border: #e0e0e0;
    --hcw-bot-bg: #f1f3f4;
    --hcw-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

#hotel-chat-root {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#hotel-chat-root.bottom-right {
    bottom: 20px;
    right: 20px;
}

#hotel-chat-root.bottom-left {
    bottom: 40px;
    left: 40px;
}

.hcw-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--hcw-primary);
    border: none;
    cursor: pointer;
    box-shadow: var(--hcw-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hcw-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.hcw-toggle svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.hcw-toggle img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.hcw-toggle .hcw-icon-close {
    display: none;
}

.hcw-toggle.active .hcw-icon-chat {
    display: none;
}

.hcw-toggle.active .hcw-icon-close {
    display: block;
}

.hcw-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: var(--hcw-bg);
    border-radius: 16px;
    box-shadow: var(--hcw-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hcw-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hcw-header {
    background: var(--hcw-primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hcw-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hcw-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hcw-avatar svg,
.hcw-avatar img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.hcw-button-icon {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.hcw-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.hcw-status {
    font-size: 12px;
    opacity: 0.9;
}

.hcw-minimize {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.hcw-minimize:hover {
    background: rgba(255,255,255,0.1);
}

.hcw-minimize svg {
    width: 20px;
    height: 20px;
}

.hcw-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fafafa;
}

.hcw-messages::-webkit-scrollbar {
    width: 6px;
}

.hcw-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.hcw-message {
    display: flex;
    gap: 8px;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hcw-message.bot {
    align-self: flex-start;
}

.hcw-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

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

.hcw-message.bot .hcw-message-content {
    background: var(--hcw-bot-bg);
    color: var(--hcw-text);
    border-bottom-left-radius: 4px;
}

.hcw-message.user .hcw-message-content {
    background: var(--hcw-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.hcw-typing {
    display: none;
    padding: 12px 16px;
    background: var(--hcw-bot-bg);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.hcw-typing.active {
    display: block;
}

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

.hcw-typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.hcw-input-container {
    padding: 16px 20px;
    background: var(--hcw-bg);
    border-top: 1px solid var(--hcw-border);
}

.hcw-input-form {
    display: flex;
    gap: 8px;
}

.hcw-voice-btn {
    background: white;
    border: 1px solid var(--hcw-border);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hcw-voice-btn:hover {
    background: #f5f5f5;
}

.hcw-voice-btn.recording {
    background: #ff4444;
    border-color: #ff4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.hcw-voice-btn svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

.hcw-voice-btn.recording svg {
    fill: white;
}

.hcw-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--hcw-border);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.hcw-input:focus {
    border-color: var(--hcw-primary);
}

.hcw-send-btn {
    width: 44px;
    height: 44px;
    background: var(--hcw-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hcw-send-btn:hover:not(:disabled) {
    background: var(--hcw-primary-dark);
    transform: scale(1.05);
}

.hcw-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hcw-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

@media (max-width: 480px) {
    .hcw-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 80px;
    }
    
    #hotel-chat-root.bottom-right,
    #hotel-chat-root.bottom-left {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
}
