/* mingkos 客服与统计插件样式 v1.9.29 */

#mingkos-cs-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    line-height: 1.3;
}

.mingkos-cs-toggle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #1e293b;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.mingkos-cs-toggle:hover {
    transform: scale(1.05);
    background: #0f172a;
}

.mingkos-badge-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

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

#mingkos-cs-panel {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 340px;
    max-width: calc(100vw - 40px);
    padding: 16px 16px 14px;
    margin-bottom: 10px;
    display: none;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
#mingkos-cs-panel.active {
    display: block;
}

.mingkos-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.mingkos-panel-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}
.mingkos-panel-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #94a3b8;
}
.mingkos-panel-close:hover {
    color: #475569;
}

.mingkos-status {
    text-align: center;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 500;
}
.mingkos-status.online {
    color: #10b981;
}
.mingkos-status.offline {
    color: #ef4444;
}

.mingkos-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin: 8px 0 10px;
}

.mingkos-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.mingkos-btn:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.mingkos-wa { border-color: #25d366; }
.mingkos-wa:hover { background: #ecfdf5; }
.mingkos-wc { border-color: #07c160; }
.mingkos-wc:hover { background: #f0fdf4; }
.mingkos-email { border-color: #ea4335; }
.mingkos-email:hover { background: #fef0ef; }

#mingkos-wechat-sub {
    margin: 8px 0 6px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
}
#mingkos-wechat-sub p {
    margin: 4px 0;
    font-size: 12px;
}
.mingkos-copy-btn {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 12px;
    font-size: 12px;
    cursor: pointer;
}
.mingkos-copy-btn:hover {
    background: #f1f5f9;
}
.mingkos-wechat-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.mingkos-mode-selector {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}
.mingkos-mode-btn {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #1e293b;
    flex: 1;
    text-align: center;
}
.mingkos-mode-btn.active {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
}
.mingkos-mode-btn:hover {
    background: #e2e8f0;
}

.mingkos-chat-container {
    display: block;
}
.mingkos-contact-container {
    display: none;
}

#mingkos-chat-messages {
    height: 180px;
    overflow-y: auto;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 8px;
}
.mingkos-chat-msg {
    margin-bottom: 8px;
    max-width: 85%;
}
.mingkos-chat-msg.visitor {
    text-align: left;
}
.mingkos-chat-msg.admin {
    text-align: right;
    margin-left: auto;
}
.mingkos-chat-msg .bubble {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    word-break: break-word;
}
.mingkos-chat-msg.visitor .bubble {
    background: #f1f5f9;
    color: #1e293b;
}
.mingkos-chat-msg.admin .bubble {
    background: #1e293b;
    color: #fff;
}
.mingkos-chat-msg .sender {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}
#mingkos-chat-welcome {
    padding: 8px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

#mingkos-chat-form .name-email-row {
    display: flex;
    gap: 8px;
}
#mingkos-chat-form .name-email-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
}
#mingkos-chat-form .name-email-row input:focus {
    border-color: #1e293b;
    outline: none;
}

#mingkos-chat-send {
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 12px;
}
#mingkos-chat-send:hover {
    background: #0f172a;
}
#mingkos-chat-send:disabled {
    opacity: 0.5;
}

#mingkos-chat-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
}
#mingkos-chat-input:focus {
    border-color: #1e293b;
    outline: none;
}

.mingkos-chat-input-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.mingkos-contact-form-group {
    margin-bottom: 8px;
}
.mingkos-contact-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 2px;
}
.mingkos-contact-form-group input,
.mingkos-contact-form-group textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    box-sizing: border-box;
}
.mingkos-contact-form-group textarea {
    height: 60px;
    resize: vertical;
}

#mingkos-contact-submit {
    width: 100%;
    padding: 8px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
}
#mingkos-contact-submit:hover {
    background: #0f172a;
}
#mingkos-contact-submit:disabled {
    opacity: 0.5;
}

#mingkos-contact-message {
    margin-top: 6px;
    font-size: 12px;
    text-align: center;
    padding: 6px;
    border-radius: 4px;
}
.mingkos-form-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.mingkos-form-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.mingkos-offline-message {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
    text-align: center;
}

.mingkos-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #475569;
}
.mingkos-stats span {
    display: flex;
    justify-content: space-between;
}
.mingkos-stats strong {
    color: #0f172a;
}

.mingkos-version {
    text-align: center;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

#mingkos-greeting {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 20px 24px;
    width: 280px;
    max-width: calc(100vw - 40px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.mingkos-greeting-content {
    position: relative;
}
.mingkos-greeting-text {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.5;
    text-align: center;
}
.mingkos-greeting-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.mingkos-greeting-close:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}
#mingkos-greeting-reply {
    width: 100%;
    background: #25d366;
    border: none;
    color: #fff;
    padding: 12px 0;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}
#mingkos-greeting-reply:hover {
    background: #1da851;
    transform: scale(1.02);
}
#mingkos-greeting-reply:active {
    transform: scale(0.98);
}