/**
 * KleinWeb Elementor 小工具合集样式
 */

/* 公告栏小工具样式 */
.kleinweb-announcement-bar {
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.kleinweb-announcement-item {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px;
}

.kleinweb-announcement-global-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 文字图标样式 */
.kleinweb-announcement-global-icon.text-icon {
    background-color: #4054B2;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 40px;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.kleinweb-announcement-global-icon.text-icon:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(calc(-50% - 2px));
}

.kleinweb-announcement-global-icon i,
.kleinweb-announcement-global-icon svg {
    color: #4054B2;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.kleinweb-announcement-content-wrapper {
    flex: 1;
    overflow: hidden;
    padding-left: 40px; /* 为全局图标腾出空间 */
}

/* 内容显示模式样式 */
.kleinweb-announcement-content-wrapper.content-display-singleline {
    white-space: nowrap;
    overflow: hidden;
}

.kleinweb-announcement-content-wrapper.content-display-singleline .kleinweb-announcement-content {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.kleinweb-announcement-content-wrapper.content-display-singleline .kleinweb-announcement-content * {
    display: inline;
    white-space: nowrap;
}

.kleinweb-announcement-content-wrapper.content-display-multiline {
    overflow: visible;
}

.kleinweb-announcement-content {
    font-size: 14px;
    color: #666;
}

/* 轮播动画增强样式 */
.kleinweb-announcement-bar.zoom-effect .swiper-slide-active {
    transform: scale(1);
    transition: transform 0.5s ease;
}

.kleinweb-announcement-bar.zoom-effect .swiper-slide-prev,
.kleinweb-announcement-bar.zoom-effect .swiper-slide-next {
    transform: scale(0.9);
    transition: transform 0.5s ease;
}

.kleinweb-announcement-bar.fade-effect .swiper-slide {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.kleinweb-announcement-bar.fade-effect .swiper-slide-active {
    opacity: 1;
}

.kleinweb-announcement-bar.slow-fade-effect .swiper-slide {
    opacity: 0;
    transition: opacity 1.2s ease;
}

.kleinweb-announcement-bar.slow-fade-effect .swiper-slide-active {
    opacity: 1;
}

/* 富文本编辑器内容样式 */
.kleinweb-announcement-content p {
    margin: 0 0 10px;
}

.kleinweb-announcement-content p:last-child {
    margin-bottom: 0;
}

.kleinweb-announcement-content ul,
.kleinweb-announcement-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.kleinweb-announcement-content strong {
    font-weight: 700;
}

.kleinweb-announcement-content em {
    font-style: italic;
}

.kleinweb-announcement-content a {
    color: #4054B2;
    text-decoration: underline;
}

.kleinweb-announcement-content a:hover {
    color: #333;
    text-decoration: none;
}

.kleinweb-announcement-content h1,
.kleinweb-announcement-content h2,
.kleinweb-announcement-content h3,
.kleinweb-announcement-content h4,
.kleinweb-announcement-content h5,
.kleinweb-announcement-content h6 {
    margin: 10px 0;
    line-height: 1.4;
}

.kleinweb-announcement-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.kleinweb-announcement-content blockquote {
    border-left: 4px solid #ddd;
    padding: 10px 20px;
    margin: 10px 0;
    color: #666;
}

.kleinweb-announcement-content code {
    background: #f4f4f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.kleinweb-announcement-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.kleinweb-announcement-link .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Lottie动画小工具样式 */
.kleinweb-lottie-container {
    display: block;
    width: 100%;
}

.kleinweb-lottie-animation {
    display: inline-block;
    position: relative;
    overflow: hidden;
    width: 300px;
    height: 300px;
    background-color: transparent;
    transition: all 0.3s ease;
}

/* Lottie动画内容容器 */
.kleinweb-lottie-animation-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.kleinweb-lottie-animation-container svg,
.kleinweb-lottie-animation-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 移除旧的裁剪样式 */
/* 适应现代浏览器的裁剪方式 */
@supports (clip-path: inset(0)) {
    .kleinweb-lottie-animation.has-crop {
        overflow: visible !important;
    }
}

/* 旧版浏览器裁剪支持 */
@supports not (clip-path: inset(0)) {
    .kleinweb-lottie-animation.has-crop {
        overflow: hidden !important;
    }
}

/* 响应式调整 */
@media (max-width: 767px) {
    .kleinweb-announcement-content {
        font-size: 13px;
    }
    
    .kleinweb-announcement-content-wrapper {
        padding-left: 30px;
    }
    
    .kleinweb-announcement-global-icon {
        left: 10px;
    }
    
    .kleinweb-announcement-global-icon i,
    .kleinweb-announcement-global-icon svg {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    .kleinweb-announcement-global-icon.text-icon {
        font-size: 10px;
        padding: 4px 8px;
        min-width: 30px;
    }
}

/* 快捷按钮小工具样式 */
.kleinweb-quick-buttons-container {
    position: fixed;
    z-index: 999;
    display: flex;
    transition: all 0.3s ease;
}

/* 位置控制 */
.kleinweb-quick-buttons-position-bottom-right .kleinweb-quick-buttons-container {
    bottom: 20px;
    right: 20px;
}

.kleinweb-quick-buttons-position-bottom-left .kleinweb-quick-buttons-container {
    bottom: 20px;
    left: 20px;
}

.kleinweb-quick-buttons-position-bottom-center .kleinweb-quick-buttons-container {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.kleinweb-quick-buttons-position-top-right .kleinweb-quick-buttons-container {
    top: 20px;
    right: 20px;
}

.kleinweb-quick-buttons-position-top-left .kleinweb-quick-buttons-container {
    top: 20px;
    left: 20px;
}

.kleinweb-quick-buttons-position-center-right .kleinweb-quick-buttons-container {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.kleinweb-quick-buttons-position-center-left .kleinweb-quick-buttons-container {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

/* 布局控制 - 底部居中布局特殊处理 */
.kleinweb-quick-buttons-position-bottom-center.kleinweb-quick-buttons-layout-horizontal .kleinweb-quick-buttons-container {
    flex-direction: row;
    justify-content: center;
}

.kleinweb-quick-buttons-position-bottom-center.kleinweb-quick-buttons-layout-vertical .kleinweb-quick-buttons-container {
    flex-direction: column;
    align-items: center;
}

.kleinweb-quick-buttons-position-bottom-center.kleinweb-quick-buttons-layout-grid .kleinweb-quick-buttons-container {
    flex-wrap: wrap;
    justify-content: center;
}

/* 布局控制 */
.kleinweb-quick-buttons-layout-vertical .kleinweb-quick-buttons-container {
    flex-direction: column;
}

.kleinweb-quick-buttons-layout-horizontal .kleinweb-quick-buttons-container {
    flex-direction: row;
}

.kleinweb-quick-buttons-layout-grid .kleinweb-quick-buttons-container {
    flex-wrap: wrap;
    width: calc(3 * (50px + 10px)); /* 默认3个按钮宽度，加上间距 */
}

/* 水平布局下的轴线对齐 */
.kleinweb-quick-buttons-layout-horizontal .kleinweb-quick-button-wrapper {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.kleinweb-quick-buttons-layout-horizontal .kleinweb-quick-button-wrapper:last-child {
    margin-right: 0;
}

/* 垂直布局下的轴线对齐 */
.kleinweb-quick-buttons-layout-vertical .kleinweb-quick-button-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.kleinweb-quick-buttons-layout-vertical .kleinweb-quick-button-wrapper:last-child {
    margin-bottom: 0;
}

/* 网格布局优化 */
.kleinweb-quick-buttons-layout-grid .kleinweb-quick-button-wrapper {
    margin: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 按钮样式 */
.kleinweb-quick-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #4054B2;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* 自定义按钮尺寸处理 */
.kleinweb-quick-button[style*="width"][style*="height"] {
    width: var(--button-custom-size, 50px) !important;
    height: var(--button-custom-size, 50px) !important;
}

/* 水平布局下的宽度调整 */
.kleinweb-quick-buttons-layout-horizontal .kleinweb-quick-button[style*="width:"] {
    width: var(--button-custom-width, 50px) !important;
}

/* 垂直布局下的高度调整 */
.kleinweb-quick-buttons-layout-vertical .kleinweb-quick-button[style*="height:"] {
    height: var(--button-custom-height, 50px) !important;
}

/* 针对胶囊形按钮的特殊处理 */
.kleinweb-quick-buttons-style-pill .kleinweb-quick-button[style*="width:"] {
    min-width: var(--button-custom-width, 50px) !important;
    width: auto !important;
    padding-left: 15px;
    padding-right: 15px;
}

.kleinweb-quick-button i,
.kleinweb-quick-button svg {
    color: #fff;
    font-size: 20px;
    width: 1em;
    height: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 自定义图标大小处理 */
.kleinweb-quick-button i[style*="font-size"],
.kleinweb-quick-button svg[style*="width"] {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
}

/* 当有文字时的图标位置调整 */
.kleinweb-quick-button:has(.kleinweb-quick-button-text) i,
.kleinweb-quick-button:has(.kleinweb-quick-button-text) svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-right: 0;
}

/* 兼容性替代方案，针对含有文字的按钮 */
.kleinweb-quick-button[data-has-text="true"] i,
.kleinweb-quick-button[data-has-text="true"] svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-right: 0;
}

/* 文字现在显示在按钮上方 */
.kleinweb-quick-button-text {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* 确保文字在上层显示 */
    pointer-events: none; /* 防止文字遮挡按钮点击 */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

/* 按钮文字位置 - 上方(默认) */
.kleinweb-text-position-top .kleinweb-quick-button-text {
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}

/* 按钮文字位置 - 右侧 */
.kleinweb-text-position-right .kleinweb-quick-button-text {
    top: 50%;
    left: auto;
    right: -10px;
    transform: translateY(-50%) translateX(100%);
    margin-right: 5px;
}

/* 按钮文字位置 - 下方 */
.kleinweb-text-position-bottom .kleinweb-quick-button-text {
    top: auto;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
}

/* 按钮文字位置 - 左侧 */
.kleinweb-text-position-left .kleinweb-quick-button-text {
    top: 50%;
    left: -10px;
    right: auto;
    transform: translateY(-50%) translateX(-100%);
    margin-left: 5px;
}

/* 指示小三角位置调整 */
/* 上方小三角(默认) */
.kleinweb-text-position-top .kleinweb-quick-button-text::after {
    bottom: -5px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.9);
    border-bottom: none;
}

/* 右侧小三角 */
.kleinweb-text-position-right .kleinweb-quick-button-text::after {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid rgba(255, 255, 255, 0.9);
    border-left: none;
}

/* 下方小三角 */
.kleinweb-text-position-bottom .kleinweb-quick-button-text::after {
    top: -5px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(255, 255, 255, 0.9);
    border-top: none;
}

/* 左侧小三角 */
.kleinweb-text-position-left .kleinweb-quick-button-text::after {
    right: -5px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid rgba(255, 255, 255, 0.9);
    border-right: none;
}

/* 悬停时显示文字 */
.kleinweb-quick-buttons-text-hover .kleinweb-quick-button-text {
    opacity: 0;
    visibility: hidden;
}

/* 上方文字位置的悬停效果 */
.kleinweb-quick-buttons-text-hover.kleinweb-text-position-top .kleinweb-quick-button-text {
    transform: translateX(-50%) translateY(10px);
}

.kleinweb-quick-buttons-text-hover.kleinweb-text-position-top .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 右侧文字位置的悬停效果 */
.kleinweb-quick-buttons-text-hover.kleinweb-text-position-right .kleinweb-quick-button-text {
    transform: translateY(-50%) translateX(calc(100% - 10px));
}

.kleinweb-quick-buttons-text-hover.kleinweb-text-position-right .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(100%);
}

/* 下方文字位置的悬停效果 */
.kleinweb-quick-buttons-text-hover.kleinweb-text-position-bottom .kleinweb-quick-button-text {
    transform: translateX(-50%) translateY(-10px);
}

.kleinweb-quick-buttons-text-hover.kleinweb-text-position-bottom .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 左侧文字位置的悬停效果 */
.kleinweb-quick-buttons-text-hover.kleinweb-text-position-left .kleinweb-quick-button-text {
    transform: translateY(-50%) translateX(calc(-100% + 10px));
}

.kleinweb-quick-buttons-text-hover.kleinweb-text-position-left .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-100%);
}

.kleinweb-quick-buttons-text-hover .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text {
    opacity: 1;
    visibility: visible;
}

/* 顶部位置的按钮悬停文字效果 */
.kleinweb-quick-buttons-text-hover.kleinweb-quick-buttons-position-top-left .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text,
.kleinweb-quick-buttons-text-hover.kleinweb-quick-buttons-position-top-right .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text,
.kleinweb-quick-buttons-text-hover.kleinweb-quick-buttons-position-top-center .kleinweb-quick-button-wrapper:hover .kleinweb-quick-button-text {
    transform: translateX(-50%) translateY(0);
}

.kleinweb-quick-buttons-text-hover.kleinweb-quick-buttons-position-top-left .kleinweb-quick-button-text,
.kleinweb-quick-buttons-text-hover.kleinweb-quick-buttons-position-top-right .kleinweb-quick-button-text,
.kleinweb-quick-buttons-text-hover.kleinweb-quick-buttons-position-top-center .kleinweb-quick-button-text {
    transform: translateX(-50%) translateY(-10px);
}

/* 文字状态效果-允许使用before/after伪元素 */
.kleinweb-quick-button-text::before,
.kleinweb-quick-button-text::after {
    content: '';
    position: absolute;
    display: block;
    transition: inherit;
}

/* 按钮包装器需要相对定位 */
.kleinweb-quick-button-wrapper {
    position: relative;
}

/* 文字位置自适应调整 */
.kleinweb-quick-buttons-position-top-left .kleinweb-quick-button-wrapper .kleinweb-quick-button-text,
.kleinweb-quick-buttons-position-top-right .kleinweb-quick-button-wrapper .kleinweb-quick-button-text,
.kleinweb-quick-buttons-position-top-center .kleinweb-quick-button-wrapper .kleinweb-quick-button-text {
    top: auto;
    bottom: -25px;
}

/* 原有设置，现在需要移除左边距 */
/* .kleinweb-quick-button-text {
    margin-left: 8px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
} */

/* 按钮形状样式 */
.kleinweb-quick-buttons-style-square .kleinweb-quick-button {
    border-radius: 0 !important;
}

.kleinweb-quick-buttons-style-rounded .kleinweb-quick-button {
    border-radius: 8px !important;
}

.kleinweb-quick-buttons-style-pill .kleinweb-quick-button {
    border-radius: 25px !important;
    padding-left: 10px;
    padding-right: 10px;
    min-width: 50px;
    width: auto;
}

/* 圆形按钮特殊处理 - 确保总是保持圆形 */
.kleinweb-quick-buttons-style-circle .kleinweb-quick-button {
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
}

/* 确保圆形按钮在水平排列时垂直居中对齐 */
.kleinweb-quick-buttons-layout-horizontal.kleinweb-quick-buttons-style-circle .kleinweb-quick-button-wrapper {
    display: flex;
    align-items: center;
}

/* 确保圆形按钮在垂直排列时水平居中对齐 */
.kleinweb-quick-buttons-layout-vertical.kleinweb-quick-buttons-style-circle .kleinweb-quick-button-wrapper {
    display: flex;
    justify-content: center;
}

/* 胶囊形按钮图标修复 */
.kleinweb-quick-buttons-style-pill .kleinweb-quick-button i,
.kleinweb-quick-buttons-style-pill .kleinweb-quick-button svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-right: 0;
}

.kleinweb-quick-buttons-style-pill .kleinweb-quick-button:not([data-has-text="true"]) i,
.kleinweb-quick-buttons-style-pill .kleinweb-quick-button:not([data-has-text="true"]) svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

/* 按钮自定义尺寸与胶囊形按钮的兼容处理 */
.kleinweb-quick-buttons-style-pill .kleinweb-quick-button[style*="width:"][style*="height:"] {
    height: var(--button-custom-size, 50px) !important;
    min-width: var(--button-custom-size, 50px) !important;
    width: auto !important;
}

/* 悬停动画效果 */
.kleinweb-quick-buttons-hover-grow .kleinweb-quick-button:hover {
    transform: scale(1.1);
}

.kleinweb-quick-buttons-hover-shrink .kleinweb-quick-button:hover {
    transform: scale(0.9);
}

.kleinweb-quick-buttons-hover-pulse .kleinweb-quick-button:hover {
    animation: kleinweb-pulse 1s infinite;
}

.kleinweb-quick-buttons-hover-bounce .kleinweb-quick-button:hover {
    animation: kleinweb-bounce 0.8s;
}

.kleinweb-quick-buttons-hover-rotate .kleinweb-quick-button:hover {
    transform: rotate(360deg);
}

/* 入场动画效果 */
.kleinweb-quick-buttons-hidden {
    opacity: 0;
    visibility: hidden;
}

.kleinweb-quick-buttons-animation-fade .kleinweb-quick-buttons-container {
    opacity: 1;
    visibility: visible;
}

.kleinweb-quick-buttons-animation-fade .kleinweb-quick-buttons-hidden {
    opacity: 0;
    visibility: hidden;
}

.kleinweb-quick-buttons-animation-slide-up .kleinweb-quick-buttons-container {
    transform: translateY(0);
}

.kleinweb-quick-buttons-animation-slide-up .kleinweb-quick-buttons-hidden {
    transform: translateY(50px);
}

.kleinweb-quick-buttons-animation-slide-down .kleinweb-quick-buttons-container {
    transform: translateY(0);
}

.kleinweb-quick-buttons-animation-slide-down .kleinweb-quick-buttons-hidden {
    transform: translateY(-50px);
}

.kleinweb-quick-buttons-animation-slide-left .kleinweb-quick-buttons-container {
    transform: translateX(0);
}

.kleinweb-quick-buttons-animation-slide-left .kleinweb-quick-buttons-hidden {
    transform: translateX(50px);
}

.kleinweb-quick-buttons-animation-slide-right .kleinweb-quick-buttons-container {
    transform: translateX(0);
}

.kleinweb-quick-buttons-animation-slide-right .kleinweb-quick-buttons-hidden {
    transform: translateX(-50px);
}

.kleinweb-quick-buttons-animation-zoom-in .kleinweb-quick-buttons-container {
    transform: scale(1);
}

.kleinweb-quick-buttons-animation-zoom-in .kleinweb-quick-buttons-hidden {
    transform: scale(0.5);
}

/* 点击效果 */
.kleinweb-button-clicked {
    animation: kleinweb-button-click 0.3s ease-out;
}

/* 微信二维码弹窗 */
.kleinweb-wechat-qrcode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.kleinweb-wechat-qrcode-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.kleinweb-wechat-qrcode-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 300px;
    text-align: center;
    position: relative;
}

.kleinweb-wechat-qrcode-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.kleinweb-wechat-qrcode-image-container {
    width: 200px;
    height: 200px;
    margin: 10px auto;
}

.kleinweb-wechat-qrcode-image {
    width: 100%;
    height: auto;
}

/* 提示消息样式 */
.kleinweb-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.kleinweb-toast.active {
    opacity: 1;
    visibility: visible;
}

/* 动画关键帧定义 */
@keyframes kleinweb-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes kleinweb-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes kleinweb-button-click {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式显示控制 - 使用!important确保覆盖其他样式规则，保证显示控制选项正确生效 */
@media (min-width: 1025px) {
    .kleinweb-desktop-mode-no {
        display: none !important; /* 高优先级确保在桌面设备上隐藏元素 */
    }
    /* 桌面视图下，仅应用桌面显示控制规则，忽略其他设备的显示控制 */
    .kleinweb-desktop-mode-yes {
        display: flex !important; /* 保证显示选项开启时元素能正确显示 */
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .kleinweb-tablet-mode-no {
        display: none !important; /* 高优先级确保在平板设备上隐藏元素 */
    }
    /* 平板视图下，仅应用平板显示控制规则，忽略其他设备的显示控制 */
    .kleinweb-tablet-mode-yes {
        display: flex !important; /* 保证显示选项开启时元素能正确显示 */
    }
}

@media (max-width: 767px) {
    .kleinweb-mobile-mode-no {
        display: none !important; /* 高优先级确保在移动设备上隐藏元素 */
    }
    /* 移动视图下，仅应用移动显示控制规则，忽略其他设备的显示控制 */
    .kleinweb-mobile-mode-yes {
        display: flex !important; /* 保证显示选项开启时元素能正确显示 */
    }
}

/* 编辑器中预览时确保元素可见 */
.elementor-editor-preview-active {
    display: flex !important; /* 在编辑器中始终显示，便于编辑 */
}

/* ------------------------------ */
/* Logo滚动栏样式设置 */
/* ------------------------------ */

/**
 * 基础容器样式
 */
.kleinweb-logo-carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/**
 * Swiper轮播样式
 */
.kleinweb-logo-carousel-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden; /* 确保超出部分不会显示 */
}

.kleinweb-logo-carousel {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    transition-property: transform;
    will-change: transform; /* 硬件加速提示 */
    transform-style: preserve-3d; /* 启用3D硬件加速 */
    backface-visibility: hidden; /* 减少复合层 */
    perspective: 1000px; /* 提供3D加速 */
}

/**
 * Logo项目样式
 */
.kleinweb-logo-carousel-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    /* 确保项目有最小高度 */
    min-height: 100px;
    -webkit-transform: translate3d(0, 0, 0); /* 移动设备硬件加速 */
    -moz-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    -o-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    }
    
.kleinweb-logo-carousel-item img {
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 80px; /* 默认最大高度 */
    object-fit: contain;
    transition: all 0.3s ease;
    margin: 0 auto; /* 确保居中 */
    /* 确保图片有最小宽度 */
    min-width: 30px;
}

.kleinweb-logo-carousel-item a {
    display: flex;
        justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    }
    
/**
 * 灰度效果
 */
.kleinweb-logo-carousel-grayscale .kleinweb-logo-carousel-item img {
    filter: grayscale(100%);
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    }
    
.kleinweb-logo-carousel-hover-color .kleinweb-logo-carousel-item:hover img {
    filter: grayscale(0%);
    }
    
/**
 * 分页器样式
 */
.kleinweb-logo-carousel-container .swiper-pagination {
    position: relative;
    margin-top: 20px;
    width: 100%;
    text-align: center;
    }
    
.kleinweb-logo-carousel-container .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 5px;
    background: #ccc;
    opacity: 0.7;
    transition: all 0.3s ease;
    }
    
.kleinweb-logo-carousel-container .swiper-pagination-bullet-active {
    background: #4054B2;
    opacity: 1;
    transform: scale(1.2);
    }
    
/**
 * 响应式设计
 */
@media (max-width: 767px) {
    .kleinweb-logo-carousel-container {
        padding: 15px !important;
    }
    
    .kleinweb-logo-carousel-container .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
        margin: 0 3px;
    }
    }
    
/**
 * 动画效果
 * 为不同的动画类型提供CSS支持
 */

/* 连续滚动效果增强 */
.kleinweb-logo-carousel-container[data-animation-type="continuous"] .swiper-wrapper {
    transition-timing-function: linear !important; /* 强制线性过渡 */
    will-change: transform; /* 硬件加速提示 */
    transform: translate3d(0, 0, 0); /* 强制创建图层 */
    }
    
/* 防止循环处过渡跳动 */
.kleinweb-logo-carousel-container .swiper-wrapper {
    backface-visibility: hidden;
    transform-style: preserve-3d;
    perspective: 1000px; /* 3D加速 */
    transform: translate3d(0, 0, 0); /* 强制硬件加速 */
}

/* 确保循环正常 */
.kleinweb-logo-carousel-container .swiper-slide-duplicate {
    opacity: 1 !important; /* 确保复制的slide可见 */
    visibility: visible !important;
    will-change: transform; /* 硬件加速 */
    transform: translate3d(0, 0, 0); /* 硬件加速 */
    }
    
/* 确保复制的项目和原始项目视觉上一致 */
.kleinweb-logo-carousel-duplicate.swiper-slide {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 不透明度过渡优化 */
.kleinweb-logo-carousel-item {
    opacity: 1 !important; /* 确保所有项目显示 */
    transition: transform 0.5s ease, opacity 0.3s ease;
    will-change: transform, opacity; /* 提示浏览器预优化 */
}

/* 提高循环处理性能 */
.kleinweb-logo-carousel-wrapper .swiper-notification {
    display: none !important; /* 彻底禁用通知元素 */
}

/* 针对连续滚动模式的性能优化 */
.kleinweb-logo-carousel-container[data-animation-type="continuous"] {
    /* 在容器级别应用3D变换，创建合成层 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    }
    
/* 防止循环点动画突变 */
.kleinweb-logo-carousel-container[data-animation-type="continuous"] .swiper-wrapper.notransition {
    transition: none !important;
}

/* 优化移动设备上的性能 */
@media (max-width: 767px) {
    .kleinweb-logo-carousel-container[data-animation-type="continuous"] .swiper-wrapper {
        transition-property: transform;
        transition-timing-function: linear !important;
    }
    
    /* 减少移动设备上的视觉复杂度 */
    .kleinweb-logo-carousel-item {
        transform: none !important;
        transition: none !important;
    }
}

/* 文字指示小三角 */
.kleinweb-quick-button-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.9); /* 默认与文字背景色相同 */
    z-index: -1;
}

/* 顶部按钮的文字指示小三角 */
.kleinweb-quick-buttons-position-top-left .kleinweb-quick-button-text::after,
.kleinweb-quick-buttons-position-top-right .kleinweb-quick-button-text::after,
.kleinweb-quick-buttons-position-top-center .kleinweb-quick-button-text::after {
    bottom: auto;
    top: -5px;
    border-top: none;
    border-bottom: 5px solid rgba(255, 255, 255, 0.9); /* 默认与文字背景色相同 */
} 