/* 主题变量：默认浅色 */
:root {
    --contact-panel-bg: #ffffff;
    --contact-panel-border: rgba(20, 90, 170, 0.12);
    --contact-panel-text: #102033;
    --contact-image-bg: #fafcff;
    --contact-image-border: #d7deea;
    --contact-divider: #e8edf5;
    --contact-muted: #4b5e78;
    --contact-muted-2: #7a8ba0;
    --contact-hotline: #1195ff;
}

/* online 深色主题跟随 */
html[data-theme="dark"] {
    --contact-panel-bg: rgba(16, 29, 53, 0.96);
    --contact-panel-border: rgba(116, 190, 255, 0.22);
    --contact-panel-text: #eaf4ff;
    --contact-image-bg: rgba(255, 255, 255, 0.04);
    --contact-image-border: rgba(116, 190, 255, 0.26);
    --contact-divider: rgba(255, 255, 255, 0.12);
    --contact-muted: #b3c5de;
    --contact-muted-2: #9ab1cd;
    --contact-hotline: #5dc0ff;
}

/* online 浅色主题 */
html[data-theme="light"] {
    --contact-panel-bg: #ffffff;
    --contact-panel-border: rgba(20, 90, 170, 0.12);
    --contact-panel-text: #102033;
    --contact-image-bg: #fafcff;
    --contact-image-border: #d7deea;
    --contact-divider: #e8edf5;
    --contact-muted: #4b5e78;
    --contact-muted-2: #7a8ba0;
    --contact-hotline: #1195ff;
}

.contact-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
}

.contact-float__trigger {
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    min-width: 152px;
    min-height: 48px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #1578ff, #22b8cf);
    box-shadow: 0 14px 28px rgba(21, 120, 255, 0.28);
}

.contact-float__panel {
    position: absolute;
    right: 0;
    bottom: 62px;
    width: 280px;
    padding: 18px 18px 16px;
    border-radius: 18px;
    box-shadow: 0 20px 44px rgba(12, 44, 86, 0.24);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: all .2s ease;
    background: var(--contact-panel-bg);
    border: 1px solid var(--contact-panel-border);
    color: var(--contact-panel-text);
}

/* 默认只显示按钮，悬停/聚焦才显示面板 */
.contact-float:hover .contact-float__panel,
.contact-float:focus-within .contact-float__panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contact-float__title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 14px;
}

.contact-float__image-wrap {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    padding: 12px; /* 四周一致内边距 */
    box-sizing: border-box;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed var(--contact-image-border);
    background: var(--contact-image-bg);
}

.contact-float__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contact-float__wechat-hint {
    margin: 12px 0 0;
    text-align: center;
    color: var(--contact-muted);
    font-size: 15px;
}

.contact-float__hotline-label {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--contact-divider); /* 线在文字上方 */
    text-align: center;
    color: var(--contact-muted-2);
    font-size: 13px;
}

.contact-float__hotline {
    margin-top: 10px;
    text-align: center;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    color: var(--contact-hotline);
    letter-spacing: 1px;
}

/* 若 HTML 使用了电话图标/行容器，可直接生效 */
.contact-float__hotline-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-float__hotline-icon {
    color: var(--contact-hotline);
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 768px) {
    .contact-float {
        right: 12px;
        bottom: 12px;
    }

    .contact-float__panel {
        width: 250px;
        bottom: 58px;
    }

    .contact-float__hotline {
        font-size: 28px;
    }
}
