/* 暗黑模式规则已迁入 dark-mode-unified.css（原 components/buttons.css） */
/**
 * 统一按钮组件 - 极简扁平风格
 * 
 * 使用方法：
 * <button class="btn btn-primary">主要按钮</button>
 * <button class="btn btn-secondary">次要按钮</button>
 * <button class="btn btn-ghost">幽灵按钮</button>
 * <button class="btn btn-sm">小按钮</button>
 * <button class="btn btn-lg">大按钮</button>
 */

/* ========================================
   基础按钮样式 - 极简干净
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    box-shadow: none;
}

.btn:focus {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* ========================================
   按钮类型 - 主要/次要/幽灵
   ======================================== */

/* 主要按钮 - 沉稳深色 */
.btn-primary {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #1f2937;
    border-color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    background: #030712;
    transform: scale(0.97);
    box-shadow: none;
}

/* 次要按钮 - 灰色填充 */
.btn-secondary {
    background: #f9fafb;
    border-color: var(--color-border, #d4d4d8);
    color: #111827;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-secondary:active {
    background: #d0d0d0;
}

/* 幽灵按钮 - 仅边框 */
.btn-ghost {
    background: transparent;
    border-color: #e8e8e8;
    color: #1a1a1a;
}

.btn-ghost:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.btn-ghost:active {
    background: #e8e8e8;
}

/* 危险按钮 - 红色 */
.btn-danger {
    background: #f44336;
    border-color: #f44336;
    color: #ffffff;
}

.btn-danger:hover {
    background: #e53935;
    border-color: #e53935;
}

/* 文本按钮 - 无边框无背景 */
.btn-text {
    background: transparent;
    border-color: transparent;
    color: #666666;
    padding: 4px 8px;
}

.btn-text:hover {
    color: #0f766e;
    background: transparent;
}

/* ========================================
   按钮尺寸
   ======================================== */

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
}

/* 圆形按钮（图标按钮） */
.btn-circle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.btn-circle.btn-sm {
    width: 28px;
    height: 28px;
}

.btn-circle.btn-lg {
    width: 44px;
    height: 44px;
}

/* 块级按钮 */
.btn-block {
    display: flex;
    width: 100%;
}

/* ========================================
   深色模式适配
   ======================================== */








/* ========================================
   按钮组
   ======================================== */

.btn-group {
    display: inline-flex;
    gap: 8px;
}

.btn-group .btn {
    margin: 0;
}

/* 紧凑按钮组 - 按钮之间无间隙 */
.btn-group-compact {
    display: inline-flex;
    gap: 0;
}

.btn-group-compact .btn {
    border-radius: 0;
    margin: 0;
}

.btn-group-compact .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.btn-group-compact .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.btn-group-compact .btn:not(:last-child) {
    border-right-width: 0;
}

/* ========================================
   图标按钮（带图标的按钮）
   ======================================== */

.btn .btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.btn .btn-icon:last-child {
    margin-right: 0;
    margin-left: 6px;
}

.btn .btn-icon:only-child {
    margin: 0;
}

/* ========================================
   响应式
   ======================================== */

@media (max-width: 768px) {
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .btn-lg {
        padding: 10px 18px;
        font-size: 14px;
    }
}
