/**
 * 道可道 - 右侧悬浮微信客服
 */

.dkd-cs-fab {
    position: fixed;
    right: 20px;
    bottom: 82px;
    z-index: 1001;
    pointer-events: auto;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #07c160;
    color: #fff;
    font-size: 1.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dkd-cs-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(7, 193, 96, 0.55);
}

.dkd-cs-fab:focus-visible {
    outline: 2px solid var(--dkd-primary-gold, #c6a43f);
    outline-offset: 3px;
}

.dkd-cs-fab-icon {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

.dkd-cs-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dkd-cs-modal[hidden] {
    display: none !important;
}

.dkd-cs-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.dkd-cs-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    animation: dkd-cs-modal-in 0.25s ease;
}

@keyframes dkd-cs-modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dkd-cs-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.dkd-cs-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.dkd-cs-modal-title {
    margin: 0 0 16px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dkd-primary-dark, #1e3a2f);
    font-family: 'Noto Serif SC', serif;
}

.dkd-cs-modal-qr-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.dkd-cs-modal-qr {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #f0ead8;
    background: #fff;
}

.dkd-cs-modal-tip {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dkd-gray-soft, #8a8578);
    line-height: 1.5;
}

body.dkd-cs-modal-open {
    overflow: hidden;
}

@media (max-width: 550px) {
    .dkd-cs-fab {
        right: 16px;
        bottom: 76px;
        width: 46px;
        height: 46px;
        font-size: 1.5rem;
    }

    .dkd-cs-modal-panel {
        max-width: 300px;
        padding: 24px 20px 20px;
    }

    .dkd-cs-modal-qr {
        width: 200px;
        height: 200px;
    }
}
