/* === MGM 在线客服 Widget === */
.mgm-cs-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102,126,234,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}
.mgm-cs-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102,126,234,0.6);
}
.mgm-cs-btn .cs-icon {
    font-size: 26px;
    line-height: 1;
}
.mgm-cs-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
    animation: mgm-pulse 2s infinite;
}
@keyframes mgm-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
/* Panel */
.mgm-cs-panel {
    position: fixed;
    bottom: 155px;
    right: 20px;
    z-index: 9998;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
    transition: all 0.3s ease;
    animation: mgm-slideUp 0.3s ease;
}
@keyframes mgm-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.mgm-cs-panel.active {
    display: flex;
}
.mgm-cs-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mgm-cs-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.mgm-cs-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}
.mgm-cs-close:hover { opacity: 1; }
.mgm-cs-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9ff;
}
.mgm-cs-greeting {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px 12px 12px 4px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
}
.mgm-cs-greeting small {
    opacity: 0.8;
    font-size: 11px;
    display: block;
    margin-top: 6px;
}
.mgm-cs-faq-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 12px 0 8px 0;
    padding-left: 4px;
}
.mgm-cs-faq-item {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.mgm-cs-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.mgm-cs-faq-q {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.mgm-cs-faq-q .arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}
.mgm-cs-faq-item.open .mgm-cs-faq-q .arrow {
    transform: rotate(180deg);
}
.mgm-cs-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 14px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.mgm-cs-faq-item.open .mgm-cs-faq-a {
    max-height: 300px;
    padding: 0 14px 14px 14px;
}
.mgm-cs-faq-a a {
    color: #667eea;
    text-decoration: underline;
}
.mgm-cs-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fff;
    text-align: center;
    font-size: 12px;
    color: #999;
}
.mgm-cs-footer a {
    color: #667eea;
    text-decoration: none;
}
@media (max-width: 480px) {
    .mgm-cs-panel {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 150px;
        max-height: 60vh;
    }
}

