/* Container Utama */
#xlfm-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Floating Stacked Triggers */
#xlfm-stacked-triggers {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.xlfm-trigger-item {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 3px solid #fff;
}

.xlfm-trigger-item:hover {
    transform: scale(1.1) translateY(-8px) rotate(5deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.xlfm-trigger-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Chat Panel */
#xlfm-faq-panel {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

#xlfm-faq-panel[style*="display: block"] {
    display: flex !important;
}

.xlfm-header {
    background: var(--xlfm-gradient, #0073aa) !important;
    color: #fff;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.xlfm-body {
    flex: 1;
    padding: 24px;
    background: #f8fafc;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Bubbles */
.chat-bubble {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14.5px;
    line-height: 1.6;
    animation: xlfmFadeUp 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

@keyframes xlfmFadeUp { from { opacity:0; transform: translateY(15px); } to { opacity:1; transform: translateY(0); } }

.chat-bot {
    align-self: flex-start;
    background: #fff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0,0,0,0.03);
}

.chat-user {
    align-self: flex-end;
    background: var(--xlfm-primary, #0073aa);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 10px 20px -5px rgba(0, 115, 170, 0.3);
}

/* Buttons & Options */
.chat-options {
    gap: 10px;
}

.opt-btn {
    width: 100% !important;
    box-sizing: border-box !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 15px 20px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    white-space: normal !important;
    word-wrap: break-word !important;
}

.opt-btn:hover {
    background: #f1f5f9;
    border-color: var(--xlfm-primary);
    color: var(--xlfm-primary) !important;
    transform: translateX(5px);
}

.opt-btn-secondary {
    border-style: dashed !important;
    background: #fdfdfd;
}

/* Admin Card */
.admin-chat-card {
    background: #fff;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.admin-chat-card:hover {
    border-color: #22c55e;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.1);
    transform: translateY(-3px);
}

/* Form inputs premium */
.chat-form-box {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.chat-form-box input, .chat-form-box textarea {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0 !important;
    padding: 14px !important;
    border-radius: 12px !important;
}

.wa-btn {
    background: var(--xlfm-gradient) !important;
    padding: 15px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    letter-spacing: 0.5px;
}

/* Chat Footer */
.xlfm-footer {
    padding: 12px 15px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

#xlfm-input-msg {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
    font-size: 13px;
}

#xlfm-input-msg:focus { border-color: var(--xlfm-primary); }

#xlfm-send-msg {
    background: var(--xlfm-primary);
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
