/**
 * 快捷组件 CSS
 * 显示多个快捷功能卡片
 *
 * @package GoodBase
 * @since 1.0.0
 */

.home-shortcut-components {
    margin: 0rem 0;
    margin-top: -8px;
    padding: 1.2rem;
}

.shortcut-components-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.shortcut-component-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 168px;
    display: flex;
    flex-direction: column;
}

/* 标题栏 */
.shortcut-component-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #fafafa;
}

.shortcut-component-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.shortcut-component-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shortcut-component-title-group {
    flex: 1;
    min-width: 0;
}

.shortcut-component-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.shortcut-component-subtitle {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

.shortcut-component-nav {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.shortcut-nav-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 2px;
    opacity: 0;
    visibility: hidden;
}

.shortcut-component-card:hover .shortcut-nav-btn {
    opacity: 1;
    visibility: visible;
}

.shortcut-nav-btn:hover:not(.disabled) {
    border-color: #999;
    color: #333;
    background: #f5f5f5;
}

.shortcut-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.shortcut-nav-btn svg {
    width: 14px;
    height: 14px;
}

/* 分隔线 */
.shortcut-component-divider {
    height: 1px;
    background: #eee;
    margin: 0;
}

/* 内容区域 */
.shortcut-component-content {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* 图标列表样式 */
.shortcut-icons-list {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease;
    width: 100%;
}

.shortcut-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: calc(25% - 11.25px);
}

.shortcut-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.shortcut-icon-link:hover {
    opacity: 0.8;
}

.shortcut-icon-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.shortcut-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shortcut-icon-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* 按钮列表样式 */
.shortcut-buttons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shortcut-button-item {
    padding: 1px 6px;
    border: 1px solid #f7f2f2bd;
    background: #f5f5f580;
    color: #121212;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

.shortcut-button-item:hover {
    border-color: #999;
    background: #e9e9e9;
    color: #333;
}

.shortcut-button-orange {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

.shortcut-button-orange:hover {
    background: #e55a2b;
    border-color: #e55a2b;
    color: #fff;
}

/* 文本列表样式 */
.shortcut-component-content[data-type="text"] {
    overflow: hidden;
    position: relative;
}

.shortcut-text-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    will-change: transform;
}

.shortcut-text-list.scrolling {
    animation: scrollTextUp linear infinite;
}

.shortcut-text-list.clone {
    margin-top: 0;
}

@keyframes scrollTextUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.shortcut-text-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1px;
    background: #fafafa;
    border-radius: 4px;
    flex-shrink: 0;
}

.shortcut-text-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.shortcut-text-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shortcut-text-content {
    flex: 1;
    font-size: 13px;
    color: #666;
}

/* 文本链接样式 */
a.shortcut-text-content.shortcut-text-link {
    text-decoration: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

a.shortcut-text-content.shortcut-text-link:hover {
    color: #f60;
}

/* Banner轮播样式 */
.shortcut-component-content[data-type="banner"] {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.shortcut-banner-wrapper {
    position: relative;
    width: 100%;
    height: 78px;
    overflow: hidden;
}

.shortcut-banner-list {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.shortcut-banner-item {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    max-width: 100%;
}

.shortcut-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shortcut-banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

.shortcut-banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.shortcut-component-card:hover .shortcut-banner-nav {
    opacity: 1;
}

.shortcut-banner-nav-btn {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 2px;
    pointer-events: auto;
    z-index: 5;
}

.shortcut-banner-nav-btn:hover:not(.disabled) {
    border-color: #999;
    color: #333;
    background: #fff;
}

.shortcut-banner-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.shortcut-banner-nav-btn svg {
    width: 10px;
    height: 10px;
}

.shortcut-text-button {
    padding: 4px 12px;
    background: #ff4444;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.shortcut-text-button:hover {
    background: #e63939;
    color: #fff;
}

/* 轮播功能 */
.shortcut-component-content[data-type="icons"] {
    overflow: hidden;
    position: relative;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .shortcut-components-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .shortcut-components-wrapper {
        grid-template-columns: 1fr;
    }
    
    .shortcut-icon-item {
        width: calc(50% - 7.5px);
    }
}

