/* 分享功能样式 */

/* 分享按钮 */
#share-plan-btn {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#share-plan-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#share-plan-btn svg {
    transition: transform 0.3s ease;
}

#share-dropdown-arrow {
    transition: transform 0.3s ease;
}

/* 分享下拉菜单 */
#share-dropdown {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#share-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

/* 分享选项标题 */
#share-dropdown h3 {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* 分享链接输入框 */
#share-url-input {
    font-size: 12px;
    min-width: 0;
    flex: 1;
}

#share-url-input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* 复制按钮 */
#copy-link-btn {
    min-width: 40px;
    transition: all 0.2s ease;
}

#copy-link-btn:hover {
    background-color: #dbeafe;
}

/* 社交媒体按钮 */
.social-share-btn {
    transition: all 0.2s ease;
    border-radius: 8px;
    border: 1px solid transparent;
}

.social-share-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

/* 特定平台颜色 */
#share-wechat:hover {
    background-color: #dcfce7;
    border-color: #16a34a;
}

#share-weibo:hover {
    background-color: #fee2e2;
    border-color: #dc2626;
}

#share-facebook:hover {
    background-color: #dbeafe;
    border-color: #2563eb;
}

#share-twitter:hover {
    background-color: #e0f2fe;
    border-color: #0ea5e9;
}

#share-linkedin:hover {
    background-color: #dbeafe;
    border-color: #1d4ed8;
}

#share-whatsapp:hover {
    background-color: #dcfce7;
    border-color: #059669;
}

/* 微信二维码模态框 */
.wechat-qr-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 移动端适配 */
@media (max-width: 768px) {
    #share-dropdown {
        width: 280px;
        right: -50px;
        left: auto;
    }
    
    #share-dropdown .grid {
        grid-template-columns: 1fr;
    }
    
    #share-url-input {
        font-size: 14px;
    }
}

/* 响应式设计 */
@media (max-width: 640px) {
    #share-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    #share-dropdown.show {
        transform: translateY(0);
    }
    
    #share-plan-btn {
        padding: 12px 16px;
    }
}

/* 加载状态 */
.share-loading {
    position: relative;
    pointer-events: none;
}

.share-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功状态 */
.share-success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}

/* 错误状态 */
.share-error {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
}

/* 工具提示 */
.share-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.share-tooltip.show {
    opacity: 1;
}

.share-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    #share-dropdown {
        background-color: #1f2937;
        border-color: #374151;
        color: #f3f4f6;
    }
    
    #share-dropdown h3 {
        color: #f3f4f6;
        border-color: #374151;
    }
    
    #share-url-input {
        background-color: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }
    
    .social-share-btn {
        color: #f3f4f6;
    }
    
    .social-share-btn:hover {
        background-color: #374151;
        border-color: #4b5563;
    }
}

/* 可访问性 */
#share-plan-btn:focus,
.social-share-btn:focus,
#copy-link-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 打印时隐藏 */
@media print {
    #share-dropdown,
    #share-plan-btn {
        display: none !important;
    }
} 