/* 联系方式弹出式模态框样式 - fgwljs.com */

/* ===== 右下角悬浮按钮 ===== */
.contact-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.contact-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.contact-float-btn:active {
    transform: scale(1.05);
}

.contact-float-btn .contact-icon {
    width: 24px;
    height: 24px;
    color: white;
    margin-bottom: 2px;
}

.contact-float-btn .contact-text {
    font-size: 12px;
    color: white;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.contact-float-btn .online-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10B981;
    border: 2px solid white;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* ===== 模态框遮罩 ===== */
.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ===== 模态框主体 ===== */
.contact-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-modal-overlay.active .contact-modal {
    transform: scale(1);
    opacity: 1;
}

/* ===== 关闭按钮 ===== */
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close-btn:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.modal-close-btn svg {
    width: 18px;
    height: 18px;
    color: #666;
}

/* ===== 标题 ===== */
.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    padding: 28px 24px 20px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ===== 内容区域 ===== */
.modal-content {
    display: flex;
    gap: 30px;
    padding: 0 30px 30px;
}

/* ===== 左侧二维码区域 ===== */
.qrcode-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 20px;
    border-right: 1px solid #e5e7eb;
}

.qrcode-wrapper {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 10px;
}

.qrcode-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qrcode-hint {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* ===== 右侧联系信息列表 ===== */
.contact-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 10px;
}

.contact-list::-webkit-scrollbar {
    width: 6px;
}

.contact-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.contact-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.contact-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ===== 联系信息项 ===== */
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.contact-item:hover {
    background: #f3f4f6;
}

.contact-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
    flex-shrink: 0;
}

.label-icon {
    width: 18px;
    height: 18px;
    color: #6366f1;
    flex-shrink: 0;
}

.contact-label span {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
}

.contact-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.value-text {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 0.5px;
}

/* ===== 复制按钮 ===== */
.copy-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
}

.copy-btn:hover svg {
    color: white;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: color 0.2s ease;
}

/* ===== 复制成功提示 ===== */
.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.copy-toast svg {
    width: 18px;
    height: 18px;
    color: #10B981;
}

.copy-toast span {
    font-size: 14px;
    font-weight: 500;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .contact-float-btn {
        width: 54px;
        height: 54px;
        bottom: 20px;
        right: 20px;
    }

    .contact-float-btn .contact-icon {
        width: 22px;
        height: 22px;
    }

    .contact-float-btn .online-dot {
        width: 10px;
        height: 10px;
        top: 3px;
        right: 3px;
    }

    .modal-content {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px 24px;
    }

    .qrcode-section {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 20px;
    }

    .qrcode-wrapper {
        width: 160px;
        height: 160px;
    }

    .contact-list {
        max-height: 280px;
    }

    .contact-modal {
        width: 95%;
        max-height: 90vh;
    }

    .modal-title {
        font-size: 20px;
        padding: 24px 20px 16px;
    }
}

@media (max-width: 480px) {
    .contact-float-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .contact-float-btn .contact-text {
        font-size: 11px;
    }

    .contact-item {
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .contact-value {
        width: 100%;
    }

    .value-text {
        font-size: 14px;
    }

    .contact-label {
        min-width: auto;
    }
}

/* ===== 深色模式支持 ===== */
@media (prefers-color-scheme: dark) {
    .contact-modal {
        background: #1f2937;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    }

    .modal-title {
        color: #f9fafb;
    }

    .modal-close-btn {
        background: #374151;
    }

    .modal-close-btn:hover {
        background: #4b5563;
    }

    .modal-close-btn svg {
        color: #d1d5db;
    }

    .qrcode-section {
        border-right-color: #374151;
    }

    .qrcode-wrapper {
        background: #374151;
    }

    .contact-item {
        background: #374151;
    }

    .contact-item:hover {
        background: #4b5563;
    }

    .contact-label span {
        color: #d1d5db;
    }

    .value-text {
        color: #f9fafb;
    }

    .copy-btn {
        background: #4b5563;
        border-color: #6b7280;
    }

    .copy-btn:hover {
        background: #6366f1;
        border-color: #6366f1;
    }

    .copy-btn svg {
        color: #d1d5db;
    }

    .contact-list::-webkit-scrollbar-track {
        background: #374151;
    }

    .contact-list::-webkit-scrollbar-thumb {
        background: #6b7280;
    }

    .qrcode-hint {
        color: #9ca3af;
    }
}
