/* 公共模块CSS样式 */

/* 右侧悬浮效果（公共模块） */
.floating-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 1;
    transition: all 0.5s ease;
}

/* 悬浮栏显示状态 */
.floating-sidebar.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.floating-item {
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.floating-item:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.floating-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.floating-item::after {
    content: '';
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.floating-item:hover::before,
.floating-item:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 返回顶部按钮不显示提示 */
.floating-item.back-to-top::before,
.floating-item.back-to-top::after {
    display: none;
}

/* 微信二维码悬浮提示样式 */
.qr-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    width: 200px;
    text-align: center;
    z-index: 1001;
}

.qr-tooltip::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 10px solid transparent;
    border-left-color: #fff;
}

.qr-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.qr-tooltip p {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* 微信图标悬浮时显示二维码 */
.floating-item.wechat-item:hover .qr-tooltip {
    opacity: 1;
    visibility: visible;
}

.floating-item.back-to-top {
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.floating-item.back-to-top:hover {
    background: #333;
    box-shadow: 0 10px 25px rgba(102, 102, 102, 0.4);
}

/* 微信二维码弹窗 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.qr-modal.show {
    display: flex;
}

.qr-content {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qr-header h3 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.close-btn {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.qr-body {
    text-align: center;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.qr-placeholder {
    color: #999;
    font-size: 16px;
}

.qr-body p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* 留言表单弹窗 */
.message-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.message-modal.show {
    display: flex;
}

.message-content {
    background: #fff;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.message-header {
    background: #52C3F1;
    color: #fff;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-container {
    display: flex;
    gap: 0;
}

.tab {
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tab.active {
    background: #fff;
    color: #52C3F1;
}

.tab:hover:not(.active) {
    background: rgba(255,255,255,0.3);
}

.message-info {
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.message-info i {
    color: #ffc107;
}

.tab-content {
    display: none;
    padding: 30px 20px;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.required {
    color: #ff4444;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #52C3F1;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #52C3F1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Toast提示样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding: 15px 20px;
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 18px;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-message {
    color: #333;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {

    
    .floating-item {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .floating-item::before {
        right: 70px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .floating-item::after {
        right: 60px;
    }
    
    .message-content {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    
    .floating-item {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .qr-content {
        width: 95%;
        padding: 20px;
    }
    
    .message-content {
        width: 98%;
        margin: 10px;
    }
}
