/* Chatbot Container */
#hc-chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Inter', sans-serif;
}

/* Chat Button */
#hc-chat-toggle {
    width: 60px;
    height: 60px;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    color: white;
    font-size: 24px;
}

#hc-chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

/* Chat Window */
#hc-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 10001;
}

#hc-chat-window.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* New Hub Design */
.hc-chat-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.hc-chat-view.active {
    display: flex;
}

/* Home View Header */
/* Home View Header */
.hc-home-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    padding: 40px 25px 30px;
    color: #ffffff;
    position: relative;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.hc-home-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hc-home-logo {
    height: 35px;
    filter: brightness(0) invert(1);
}

.hc-home-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #ffffff;
}

.hc-home-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
}

/* Home View Content */
.hc-home-content {
    flex: 1;
    background: #f8fafc;
    padding: 20px;
    overflow-y: auto;
    margin-top: -15px;
    padding-top: 30px;
}

.hc-home-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.hc-home-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.hc-home-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hc-home-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
    font-size: 14px;
}

.hc-home-item i {
    width: 20px;
    text-align: center;
    color: #3b82f6;
}

.hc-chat-prompt-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1);
}

.hc-chat-prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.15);
}

.hc-chat-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hc-chat-prompt-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.hc-chat-prompt-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 18px;
}

.hc-chat-prompt-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.hc-chat-prompt-arrow {
    align-self: flex-end;
    width: 35px;
    height: 35px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
}

/* Bottom Nav */
.hc-chat-nav {
    height: 70px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.hc-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
    font-weight: 600;
    flex: 1;
}

.hc-nav-item i {
    font-size: 20px;
}

.hc-nav-item.active {
    color: #2563eb;
}

/* Form View */
.hc-form-view {
    padding: 30px 25px;
    background: #ffffff;
    height: 100%;
    overflow-y: auto;
}

.hc-form-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 5px;
}

.hc-form-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 25px;
}

.hc-form-group {
    margin-bottom: 18px;
}

.hc-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.hc-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.hc-form-control:focus {
    border-color: #2563eb;
}

.hc-form-control.hc-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.hc-btn-start {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}

.hc-btn-start:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Chat View Layout */
.hc-chat-view {
    display: none;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
}

.hc-chat-view.active {
    display: flex !important;
}

/* Chat Header */
#hc-chat-window .hc-chat-header {
    background: #2563eb !important;
    padding: 15px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: none !important;
    min-height: 80px !important;
    color: #ffffff !important;
}

#hc-chat-window .hc-chat-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

#hc-chat-window .hc-chat-avatar {
    width: 45px !important;
    height: 45px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-size: 20px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

#hc-chat-window .hc-chat-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

#hc-chat-window .hc-chat-header-text h4 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

#hc-chat-window .hc-chat-header-text span {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

#hc-chat-window .hc-chat-header-text span::before {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    background: #22c55e !important;
    border-radius: 50% !important;
}

#hc-chat-window .hc-chat-header-right {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

#hc-chat-window .hc-chat-header-right div {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}

#hc-chat-window .hc-chat-header-right div:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Chat Messages Area */
#hc-chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    background: #f8fafc !important;
}

/* Message Styles */
.hc-msg-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-bottom: 8px !important;
}

.hc-msg-wrapper-user {
    align-items: flex-end !important;
}

.hc-msg-wrapper-bot,
.hc-msg-wrapper-admin {
    align-items: flex-start !important;
}

.hc-msg {
    max-width: 80% !important;
    padding: 12px 16px !important;
    border-radius: 18px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    position: relative !important;
}

/* Visitor (User) - Right Side, White */
.hc-msg-user {
    background: #ffffff !important;
    color: #1e293b !important;
    border-bottom-right-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
}

/* Support (Admin/Bot) - Left Side, Blue */
.hc-msg-bot,
.hc-msg-admin {
    background: #2563eb !important;
    color: #ffffff !important;
    border-bottom-left-radius: 4px !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2) !important;
}

.hc-msg-admin-name {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
    margin-left: 32px !important;
}

.hc-msg-admin-avatar {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    border: 1px solid #f1f5f9 !important;
    background: #fff9db !important;
}

.hc-msg-system {
    align-self: center !important;
    background: rgba(148, 163, 184, 0.1) !important;
    color: #64748b !important;
    font-size: 12px !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    max-width: 90% !important;
    text-align: center !important;
    margin: 10px 0 !important;
}

/* Fix header status icon color */
.hc-chat-header-text span::before {
    background: #ffffff !important;
    opacity: 0.8;
}

/* Chat Input Area */
.hc-chat-input-area {
    padding: 15px 20px !important;
    background: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
}

#hc-chat-input {
    flex: 1 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 10px 15px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color 0.2s !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

#hc-chat-input:focus {
    border-color: #2563eb !important;
}

#hc-chat-send {
    width: 40px !important;
    height: 40px !important;
    background: #2563eb !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    padding: 0 !important;
}

#hc-chat-send:hover {
    background: #1d4ed8 !important;
    transform: scale(1.05) !important;
}

/* Rate Limit UI */
.hc-chat-input-area.hc-rate-limited {
    background: #f1f5f9 !important;
    pointer-events: none !important;
}

.hc-chat-input-area.hc-rate-limited #hc-chat-input {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
}

.hc-chat-input-area.hc-rate-limited #hc-chat-send {
    background: #94a3b8 !important;
    opacity: 0.7 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    #hc-chat-window {
        width: 100% !important;
        height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
    }
}

/* Confirmation Modal */
.hc-chat-confirm-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.hc-chat-confirm-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.hc-confirm-content {
    background: white !important;
    padding: 30px !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    width: 85% !important;
    text-align: center !important;
    border: 1px solid #e2e8f0 !important;
    animation: fadeIn 0.3s ease-out;
}

.hc-confirm-content p {
    color: #475569 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    margin: 0 0 25px 0 !important;
    line-height: 1.5 !important;
}

.hc-confirm-actions {
    display: flex !important;
    gap: 15px !important;
    justify-content: center !important;
}

.hc-btn-cancel,
.hc-btn-confirm {
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s !important;
    flex: 1 !important;
}

.hc-btn-cancel {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

.hc-btn-confirm {
    background: #2563eb !important;
    color: white !important;
}