/* ============================================
   HERO INLINE CHAT WIDGET - ENHANCED
============================================ */

/* --- Container --- */
.hero-chat-container {
    width: 100%;
    max-width: 680px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 1px rgba(99, 102, 241, 0.5);
    display: flex;
    flex-direction: column;
    margin-top: 32px;
    animation: hc-slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, rgba(25, 35, 55, 0.95) 0%, rgba(35, 50, 75, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
@keyframes hc-slideIn {
    from { 
        opacity: 0; 
        transform: translateY(24px) scale(0.95);
    }
    to   { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

/* --- Header --- */
.hc-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 100%);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.hc-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}
.hc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color, #b8860b) 0%, var(--secondary-color, #d4a017) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
    flex-shrink: 0;
}
.hc-header-info strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.hc-status {
    display: block;
    font-size: 12px;
    color: rgba(134, 239, 172, 0.9);
    font-weight: 500;
}
.hc-close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: all 0.25s;
}
.hc-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* --- Messages --- */
.hc-messages {
    height: 340px;
    overflow-y: auto;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.25);
}
.hc-messages::-webkit-scrollbar {
    width: 6px;
}
.hc-messages::-webkit-scrollbar-track {
    background: transparent;
}
.hc-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}
.hc-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.hc-msg {
    display: flex;
    max-width: 92%;
}
.hc-user {
    align-self: flex-end;
    margin-left: auto;
}
.hc-assistant {
    align-self: flex-start;
}

.hc-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.hc-user .hc-bubble {
    background: linear-gradient(135deg, var(--secondary-color, #b8860b) 0%, var(--secondary-color, #d4a017) 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}
.hc-assistant .hc-bubble {
    background: rgba(255, 255, 255, 0.98);
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* --- Typing Indicator --- */
.hc-typing-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
}
.hc-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
    animation: hc-dot 1.2s infinite;
}
.hc-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.hc-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes hc-dot {
    0%, 60%, 100% {
        opacity: 0.35;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- CTA WhatsApp --- */
.hc-cta {
    align-self: center;
    max-width: 100%;
    margin-top: 6px;
}
.hc-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
    color: #fff !important;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}
.hc-wa-btn:hover {
    background: linear-gradient(135deg, #1da851 0%, #128c3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}
.hc-wa-btn i {
    font-size: 18px;
}

/* --- Input Form --- */
.hc-form {
    display: flex;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    gap: 10px;
}
#hc-input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: inherit;
    transition: all 0.25s;
}
#hc-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}
#hc-input:focus {
    border-color: var(--secondary-color, #b8860b);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.2);
}
.hc-send {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color, #b8860b) 0%, var(--secondary-color, #d4a017) 100%);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}
.hc-send:hover {
    transform: scale(1.08);
    filter: brightness(1.15);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.4);
}
.hc-send:active {
    transform: scale(0.95);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .hero-chat-container {
        max-width: 100%;
        margin-top: 24px;
    }
    .hc-messages {
        height: 300px;
    }
    .hc-header {
        padding: 14px 16px;
    }
    .hc-avatar {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .hc-header-info strong {
        font-size: 15px;
    }
}
