/**
 * 预设主题切换样式 - 矮扁紧凑设计
 */

/* 预设主题容器 */
.theme-preset-container {
    margin-bottom: 15px;
    padding: 12px;
    background: var(--bg-secondary, #252525);
    border: 1px solid var(--bg-border, #333);
    border-radius: var(--border-radius, 4px);
}

/* 预设按钮容器 - 支持自动换行 */
.theme-preset-buttons {
    display: flex;
    flex-wrap: wrap;  /* 支持自动换行 */
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

/* 预设按钮 - 矮扁紧凑设计 */
.theme-preset-btn {
    height: 32px;     /* 矮扁高度 */
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    flex: 1 1 calc(33.333% - 7px);  /* 3个按钮一行，自动换行 */
    min-width: 100px;
    max-width: 150px;
    
    border: 1px solid var(--bg-border, #333);
    border-radius: 4px;
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--text-primary, #e4e7ed);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-preset-btn:hover {
    background: var(--bg-hover, #2c2c2c);
    border-color: var(--primary-color, #007bff);
    transform: translateY(-1px);
}

.theme-preset-btn.active {
    background: var(--primary-bg, #1e3a8a);
    border-color: var(--primary-color, #007bff);
    color: var(--text-active, #ffffff);
    position: relative;
}

/* 激活状态下显示取消提示 */
.theme-preset-btn.active::after {
    content: "点击取消";
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--warning-color, #e6a23c);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.theme-preset-btn.active:hover::after {
    opacity: 1;
}

/* 编辑提示 */
.theme-preset-hint {
    font-size: 12px;
    color: var(--text-secondary, #cfcfcf);
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--info-color, #409eff);
    margin-top: 8px;
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(64, 158, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(64, 158, 255, 0);
    }
}

/* 响应式适配 */
@media (max-width: 768px) {
    .theme-preset-btn {
        flex: 1 1 calc(50% - 5px);
        font-size: 12px;
        height: 30px;
    }
    
    .theme-preset-hint {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .theme-preset-btn {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }
    
    .theme-preset-hint {
        font-size: 10px;
    }
}