/**
 * 按钮组件样式
 * 高级按钮组件的CSS样式定义
 */

/* 按钮包装器 */
.aee-button-wrapper {
    display: inline-block;
    width: 100%;
}

/* 按钮对齐样式 - 遵循Elementor标准 */
.elementor-align-left {
    text-align: left;
}

.elementor-align-center {
    text-align: center;
}

.elementor-align-right {
    text-align: right;
}

.elementor-align-justify .aee-button {
    width: 100%;
}

/* 响应式对齐样式 */
@media (max-width: 1024px) {
    .elementor-tablet-align-left {
        text-align: left;
    }
    
    .elementor-tablet-align-center {
        text-align: center;
    }
    
    .elementor-tablet-align-right {
        text-align: right;
    }
    
    .elementor-tablet-align-justify .aee-button {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .elementor-mobile-align-left {
        text-align: left;
    }
    
    .elementor-mobile-align-center {
        text-align: center;
    }
    
    .elementor-mobile-align-right {
        text-align: right;
    }
    
    .elementor-mobile-align-justify .aee-button {
        width: 100%;
    }
}

/* 按钮基础样式 */
.aee-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
    position: relative;
    overflow: hidden;
    outline: none;
    box-sizing: border-box;
    vertical-align: middle;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 确保与Elementor按钮样式兼容 */
.aee-button.elementor-button {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 3px;
    /* 完全依赖Elementor的默认样式，不设置任何颜色属性 */
}

.aee-button:focus {
    outline: 2px solid var(--e-global-color-primary, rgba(0, 124, 186, 0.5));
    outline-offset: 2px;
}

.aee-button:active {
    transform: translateY(1px);
}

/* 按钮文字 */
.aee-button-text {
    display: inline-block;
    line-height: inherit;
}

/* 按钮图标 */
.aee-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.aee-button-icon svg {
    display: block;
    max-width: 100%;
    height: auto;
    fill: currentColor;
}

/* 图标悬停时自动继承按钮文本颜色 */
.aee-button:hover .aee-button-icon {
    color: inherit;
}

.aee-button:hover .aee-button-icon svg {
    fill: currentColor;
}

.aee-button-icon i {
    line-height: 1;
}

/* 图标位置样式 */
.aee-button.icon-left {
    flex-direction: row;
}

.aee-button.icon-right {
    flex-direction: row;
}

.aee-button.icon-top {
    flex-direction: column;
}

.aee-button.icon-bottom {
    flex-direction: column-reverse;
}

/* 响应式设计 - 保留基本的响应式调整 */
@media (max-width: 768px) {
    .aee-button-icon {
        font-size: 12px;
    }
    
    .aee-button-icon svg {
        width: 12px;
    }
}

@media (max-width: 480px) {
    .aee-button-icon {
        font-size: 11px;
    }
    
    .aee-button-icon svg {
        width: 11px;
    }
}



/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .aee-button {
        border-width: 2px;
    }
    
    .aee-button:focus {
        outline-width: 3px;
    }
}

/* 减少动画模式支持 - 保留无障碍功能 */
@media (prefers-reduced-motion: reduce) {
    .aee-button {
        transition: none;
    }
}